This hook is run before the form is displayed.
quform_pre_display_X
This hook is run for a single form.
Example
12
3
| add_action('quform_pre_display_1', function (Quform_Form $form) { // Custom code }); |
add_action('quform_pre_display_1', function (Quform_Form $form) { // Custom code });
- On line 1, replace the number
1
with the form ID
1
2
3
4
5 | function my_pre_display(Quform_Form $form) { // Custom code } add_action('quform_pre_display_1', 'my_pre_display'); |
function my_pre_display(Quform_Form $form) { // Custom code } add_action('quform_pre_display_1', 'my_pre_display');
- On line 5, replace the number
1
with the form ID
Parameters
$form
–Quform_Form
– the form instance
quform_pre_display
This hook is run for all forms.
Example
1 2 3 | add_action('quform_pre_display', function (Quform_Form $form) { // Custom code }); |
add_action('quform_pre_display', function (Quform_Form $form) { // Custom code });
1 2 3 4 5 | function my_pre_display(Quform_Form $form) { // Custom code } add_action('quform_pre_display', 'my_pre_display', 10, 2); |
function my_pre_display(Quform_Form $form) { // Custom code } add_action('quform_pre_display', 'my_pre_display', 10, 2);
Parameters
$form
–Quform_Form
– the form instance