quform_post_process

The Quform WordPress v2 documentation is not yet finished. Please post on the forums if you have any questions in the mean time.

Click here to visit the complete documentation for Quform 1.x

This hook is run after the form is processed.

quform_post_process_X

This hook is run for a single form.

Example

12
3
4
5
add_action('quform_post_process_1', function (array $result, Quform_Form $form) {    // Custom code
 
    return $result;
}, 10, 2);
add_action('quform_post_process_1', function (array $result, Quform_Form $form) {
    // Custom code

    return $result;
}, 10, 2);
  • On line 1, replace the number 1 with the form ID
1
2
3
4
5
6
7
function my_post_process(array $result, Quform_Form $form)
{
    // Custom code
 
    return $result;
}
add_action('quform_post_process_1', 'my_post_process', 10, 2);
function my_post_process(array $result, Quform_Form $form)
{
    // Custom code

    return $result;
}
add_action('quform_post_process_1', 'my_post_process', 10, 2);
  • On line 7, replace the number 1 with the form ID

Parameters

  • $resultarray – this is an empty array but returning a non-empty array will pass that array to the controller instead of the default success result array
  • $formQuform_Form – the form instance

Accessing form data

See Getting form values

quform_post_process

This hook is run for all forms.

Example

1
2
3
4
5
add_action('quform_post_process', function (array $result, Quform_Form $form) {
    // Custom code
 
    return $result;
}, 10, 2);
add_action('quform_post_process', function (array $result, Quform_Form $form) {
    // Custom code

    return $result;
}, 10, 2);
1
2
3
4
5
6
7
function my_post_process(array $result, Quform_Form $form)
{
    // Custom code
 
    return $result;
}
add_action('quform_post_process', 'my_post_process', 10, 2);
function my_post_process(array $result, Quform_Form $form)
{
    // Custom code

    return $result;
}
add_action('quform_post_process', 'my_post_process', 10, 2);

Parameters

  • $resultarray – this is an empty array but returning a non-empty array will pass that array to the controller instead of the default success result array
  • $formQuform_Form – the form instance

Accessing form data

See Getting form values

Guides using this hook

Still having trouble? Head over to the forums.

Forums