Support Log in

9. Submission Hooks

Developer Guide
Prefer video? Watch the Fillin Forge tutorials 9 short guides covering every feature Watch

Fillin Forge fires two actions around a saved submission. There is no hook that runs before a submission is validated or saved, and no filter that changes one.

formforge/submission_created

The public submission event. It fires once the submission is saved and the notifications, webhooks and integrations have run. The callback receives the row id of the submission and a payload with a fixed set of keys:

  • form_id (int)
  • form_title (string)
  • fields (array): field key and submitted value, plain scalars only
  • user_id (int): 0 for guests
  • ip_hash (string): a salted one-way hash of the visitor IP address, never the address itself
  • created_at (string): a MySQL datetime in UTC, the moment the event fires
php
add_action( 'formforge/submission_created', function ( $submission_id, $payload ) {
    error_log( sprintf( 'Form %d received submission %d', $payload['form_id'], $submission_id ) );
}, 10, 2 );

Test submissions sent from the form builder do not fire it.

formforge/process_submission

An internal action with the form row, the complete validated data of the submission and the submission id: do_action( 'formforge/process_submission', $form, $data, $submission_id ). Fillin Forge Pro uses it to create posts and users. Its shape is tied to how submissions are stored and can change, so in your own code listen to formforge/submission_created instead.

Forge AI Assistant Online

Hi! I'm the Fillin Forge AI assistant. Ask me anything about the plugin — setup, features, troubleshooting, or development.

Just now
Powered by Forge AI · Browse docs