Gravity Forms v1.7 introduces powerful new changes to the Form Settings, Notifications and Confirmations.
All these fantastic changes come with some possible challenges to developers that have implemented hooks to extend or customize Gravity Forms default behavior related to these features. We have put a lot of thought into making this version as backwards compatible as possible, but with all the different hooks involved we cannot guarantee that you will not need to make some adjustments to your code.
The primary areas that were drastically changed within Gravity Forms are the Form Settings, Notification and Confirmations. If you have written any custom code around these areas, there is a chance your code will need to be adjusted, so please keep reading...
We hope this overview will help you better understand the underlying changes introduced in Gravity Forms v1.7 that will impact your custom code and will help you make the necessary changes to keep everything working properly with the new release. We have added documentation and examples for the new hooks introduced in Gravity Forms v1.7 to the Developer Documentation and our support team is here to answer any questions you may have.
Form Settings have been moved out of the Form Editor and given its own area within the Gravity Forms admin tool. This change gives us far more flexibility in introducing new features and accommodating customizations. The new Form Settings scraps the "Properties" and "Advanced" tabs in favor of a primary Form Settings page and the ability to add additional feature specific Form Settings pages using hooks.
The following are Form Settings related hooks that have been deprecated:
NOTE ON BACKWARDS COMPATIBILITY: As part of the change to abstract the Form Settings from the Form Editor, scripts and hooks that only applied to the Form Editor page will not be triggered on the new Form Settings pages. More specifically, the gform_editor_js hook will not be fired on the Form Settings page and functions in the form_editor.js script will not be available on the Form Settings page. Some functions required by the Form Settings page were moved from the form_editor.js script into a new script called form_admin.js. This new script contains common functions to both the Form Editor and Form Settings and will be available on both pages.
Also keep in mind that if you are targeting your scripts to be enqueued only on the Form Editor page and you have custom Form Settings, you will need to change your code so that scripts are enqueued on the new Form Settings page instead.
We have completely re-designed the Notification functionality within Gravity Forms. Notifications still use the WordPress core wp_mail() function to send emails, however the interface has been overhauled and it now supports user-defined Notifications. Notifications have been moved to the new Form Settings page.
The most important change made with Notifications is the ability for the user to have complete control over defining the Notifications. There is no longer the concept of "Admin" and "User" Notifications. There is now just Notifications and the user can configure however many they'd like. All Notifications are now treated equally and conditional logic can be used to determine when and if a Notification is sent.
Several hooks and functions have been deprecated. They are still supported and working, however they will be removed in a future release. It is a good idea to update your code so that you are no longer relying on these deprecated functions.
The following are Notification related hooks that have been deprecated:
As with Notifications, we have completely overhauled the features and capabilities of Confirmations in Gravity Forms. You are no longer limited to a single Confirmation and can configure any number of Confirmations that can be triggered using conditional logic.
There are primarily two main changes to Confirmations:
Everything here should be backwards compatible, but if you have custom code dealing with changing confirmations programmatically, it is probably a good idea to test it as soon as possible and update it so that it works as expected.
Support for custom merge tags has been altered. Prior to 1.7, custom merge tags could be added via the gform_custom_merge_tags hook. This hook is now deprecated in favor of the gform_merge_tags hook.
It is important to note that while the gform_custom_merge_tags hook is a PHP hook; the new gform_merge_tags hook is a Javascript hook. The merge tag system has been revamped in 1.7 to create a more powerful and flexible Javascript-powered method for providing a list of merge tags available for the corresponding input.
Using the gform_merge_tags is very similar to the gform_custom_merge_tags hook. The primary difference is that you must specify which "group" you would like to add your merge tag to. Previously, all custom merge tags were added to the "custom" group. Additionally, the new hook gives you complete control over the merge tags, allowing you to add/remove merge tags as needed.
For additional usage information, please refer to the gform_merge_tags documentation.