Developer Reference
The shortcode, REST routes and hooks for connecting HappyDivi Form to other tools.
All of these work on Free and Pro.
Show a Form Outside Divi#
A form built in Divi can also appear in Classic Editor content or a widget:
React to a Submission#
The form has no built-in Zapier or CRM connection, but you can send data anywhere from a hook:
add_action( 'hdf_after_submission_saved', function ( $entry_id, $form_id, $entry_data, $meta_rows, $form_settings ) {
// $meta_rows holds each field as label, type and value, keyed by field ID.
// Send the entry to your own service here.
}, 10, 5 );
Main Hooks#
| Hook | Type | Use it to |
|---|---|---|
hdf_field_errors | Filter | Add or change validation errors |
hdf_before_submission_saved | Filter | Reject a submission before it is saved |
hdf_entry_data | Filter | Change an entry before it is saved |
hdf_after_submission_saved | Action | Run code after saving, before emails queue |
hdf_after_emails_sent | Action | Run code after emails queue |
hdf_entry_status_changed | Action | React to read, star, trash or spam |
hdf_register_field_types | Action | Add a new field type |
hdf_merge_tags | Filter | Add merge tags |
hdf_email_provider | Filter | Add an email provider |
hdf_email_subject, hdf_email_body | Filter | Change an email before sending |
hdf_payment_provider, hdf_payment_gateways | Filter | Add a payment gateway |
hdf_payment_completed, hdf_payment_failed, hdf_payment_refunded | Action | React to a real payment change |
hdf_spam_signal_weights, hdf_spam_quarantine_threshold | Filter | Tune spam scoring |
hdf_purge_page_cache | Action | Purge your own cache when a form page is saved |
REST Routes#
The namespace is happydivi-form/v1. Routes such as /submit, /nonce and /upload serve the form itself, and are not designed as a general API for reading entries.