Description
The wsf_form_create_meta_data filter allows you to change form meta data (e.g. form settings) when a new form is created.
Usage
add_filter( 'wsf_form_create_meta_data', 'my_hook_function', 10, 1 );
Parameters
$meta_dataObjectAn object containing all of the form meta data.
Example
The example below demonstrates how to enable the loader on all new forms that are created.
// Add a callback function to for the wsf_form_create_meta_data action hook
add_action( 'wsf_form_create_meta_data', 'my_hook_function', 10, 1 );
// Callback function for the wsf_form_create_meta_data action hook
function my_hook_function( $meta_data ) {
// Enable the Loader setting
$meta_data->loader = 'on';
// Change the Custom Required HTML setting
$meta_data->label_mask_required = ' Required';
// Return the modified form meta data
return $meta_data;
}
Source File
This hook can be found in:<plugin root>/includes/core/class-ws-form-form.php