This hook is run after the entry has been created, but before entry data is saved.
quform_post_set_entry_id_X
This hook is run for a single form.
Example
12
3
4
5
| add_filter('quform_post_set_entry_id_1', function (array $result, Quform_Form $form) { // Custom code return $result; }, 10, 2); |
add_filter('quform_post_set_entry_id_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_set_entry_id(array $result, Quform_Form $form) { // Custom code return $result; } add_filter('quform_post_set_entry_id_1', 'my_post_set_entry_id', 10, 2); |
function my_post_set_entry_id(array $result, Quform_Form $form) { // Custom code return $result; } add_filter('quform_post_set_entry_id_1', 'my_post_set_entry_id', 10, 2);
- On line 7, replace the number
1
with the form ID
Parameters
$result
–array
– 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$form
–Quform_Form
– the form instance
Accessing form data
quform_post_set_entry_id
This hook is run for all forms.
Example
1 2 3 4 5 | add_filter('quform_post_set_entry_id', function (array $result, Quform_Form $form) { // Custom code return $result; }, 10, 2); |
add_filter('quform_post_set_entry_id', function (array $result, Quform_Form $form) { // Custom code return $result; }, 10, 2);
1 2 3 4 5 6 7 | function my_post_set_entry_id(array $result, Quform_Form $form) { // Custom code return $result; } add_filter('quform_post_set_entry_id', 'my_post_set_entry_id', 10, 2); |
function my_post_set_entry_id(array $result, Quform_Form $form) { // Custom code return $result; } add_filter('quform_post_set_entry_id', 'my_post_set_entry_id', 10, 2);
Parameters
$result
–array
– 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$form
–Quform_Form
– the form instance