Action Hooks, Filter Hooks
Filter Hooks before Submitting a Form
- apply_filters( ‘piotnetforms/form_builder/validate_pre_submit_form’, $custom_message, $fields, $form, $form_id );
Example:
(Enter Your Title ID: corresponding to the Field ID in settings section)
- apply_filters( ‘piotnetforms/form_builder/upload_dir’, $upload_dir );
- apply_filters( ‘piotnetforms/form_builder/upload_dir/file_name’, $filename );
- apply_filters( ‘piotnetforms/form_builder/fields’, $fields );
- apply_filters( ‘piotnetforms/form_builder/form_settings’, $form[‘settings’] );
- apply_filters( ‘piotnetforms/form_builder/fields_database’, $fields_database );
- apply_filters( ‘piotnetforms/form_builder/redirect’, $redirect, $fields );
- apply_filters( ‘piotnetforms/form_builder/custom_message’, false, $form_submission, $remote_request_response, $webhook_response );
- apply_filters( ‘piotnetforms/form_builder/not_send_email’, $failed, $form_submission, $remote_request_response’, webhook_response );
Action Hooks after Submitting successfully
- do_action(‘piotnetforms/form_builder/new_record’,$fields) .
$fields is an array of fields, e.g
array(
array(
‘label’=>’Email’,
‘name’=>’email’,
‘value’=>’support@piotnet.com’
) ,
array(
‘label’=>’Message’,
‘name’=>’message’,
‘value’=>’Hello’
)
)
- do_action(‘piotnetforms/form_builder/new_record_v2’,$form_submission)
- do_action( ‘piotnetforms/form_builder/remote_request_response’, $form_submission, $remote_request_response, $webhook_response );
- do_action(‘piotnetforms/form_builder/payment_status_succeeded’,$form_submission) – After Payment Success
$form_submission is an array, e.g
Event: After submitting Piotnet Forms