Big Release. Lots of new features
·
7 commits
to master
since this release
PHP API
Major changes were made to the base API endpoint hook. omg_forms_save_data
- Endpoint now exposes just two variables of data. The form data and the form itself.
- Because of this Form Addons which utilize the PHP Endpoint will need to also check to see if they were passed a WP_Error. If so they should simple bail and return that error back to the system.
Improved Error Handling
- Created helper functions to make it easier for Addon Authors to pass errors from the PHP API to the client.
return_form_level_error,return_field_level_error,return_error. return_form_level_erroris used to display a user error that something in general with the form did not work.return_field_level_erroris used when an error occurred which is due to a field value.return_erroris used to pass a developer an error. These are not usually errors that End users can do anything about.- By using these new error functions, OMG Forms will update the form and fields with an error class. All developer using OMG Forms needs to do is provide error messages and style the error to look good.
Multi-form Submissions
- OMG Forms has been revamped to allow you to have a form do multiple things. i.e. it can save an entries using the basic addon as well as add someone to Contact Contact using that addon.
- To use this feature you will need to pass an array of form_types instead of a string. A string will still work for forms that only need to do one thing, but the option has been expanded in this release.
Other Features
- All Forms now include a honeypot.
- Added lots of new Helper Function to make it easier for Developers to create Addons.
- Change textarea base sanitization to
wp_filter_kses_post - Create a hidden field template