Description
The wsf_pre_render_<form_id> filter allows you to modify the form object prior to the form being rendered.
Usage
add_filter( 'wsf_pre_render_<form_id>', 'my_hook_function', 10, 2 );
Parameters
$form
Form ObjectThe form object.$preview
BooleanWhether the form rendering is in preview mode.
Example
// Callback function for the wsf_pre_render_<form_id> filter hook function my_hook_function( $form, $preview ) { // Your code here ... // Return value return $form; } // Add a callback function for the wsf_pre_render_<form_id> filter hook add_filter( 'wsf_pre_render_<form_id>', 'my_hook_function', 10, 2 );
Source File
This hook can be found in:<plugin root>/public/class-ws-form-public.php
More Resources
- Change Form Submission Limit Settings Using PHP
- Change Tab Labels Using PHP
- Enable and Disable Dates and Times Using PHP
- Populate the Default Value of a Field Using PHP
- Populate Select, Checkbox and Radio Fields Using PHP
- Setting Which Post ID to Populate With Using PHP
- WordPress Hooks
- WordPress
add_filter
function