Developer Reference

The shortcode, REST routes and hooks for connecting HappyDivi Form to other tools.

Updated · HappyDivi Form 1.0.3

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#

HookTypeUse it to
hdf_field_errorsFilterAdd or change validation errors
hdf_before_submission_savedFilterReject a submission before it is saved
hdf_entry_dataFilterChange an entry before it is saved
hdf_after_submission_savedActionRun code after saving, before emails queue
hdf_after_emails_sentActionRun code after emails queue
hdf_entry_status_changedActionReact to read, star, trash or spam
hdf_register_field_typesActionAdd a new field type
hdf_merge_tagsFilterAdd merge tags
hdf_email_providerFilterAdd an email provider
hdf_email_subject, hdf_email_bodyFilterChange an email before sending
hdf_payment_provider, hdf_payment_gatewaysFilterAdd a payment gateway
hdf_payment_completed, hdf_payment_failed, hdf_payment_refundedActionReact to a real payment change
hdf_spam_signal_weights, hdf_spam_quarantine_thresholdFilterTune spam scoring
hdf_purge_page_cacheActionPurge 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.