Celebrate WordCamp Asia! - 30% OFF with coupon WC30 at checkout - Terms

wsf_pre_render_<form_id>

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

  1. $form Form Object
    The form object.
  2. $preview Boolean
    Whether 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