Description
Use this filter to change the default "Click to select.." placeholder text on Multi Select fields.
Usage
<?php
add_filter("gform_multiselect_placeholder", "set_multiselect_placeholder", 10, 2);
?>
You can also target a specific form by adding the form id after the hook name.
<?php
add_filter("gform_multiselect_placeholder_6", "set_multiselect_placeholder", 10, 2);
?>
Parameters
$placeholder
- (string) The placeholder to be filtered
$form_id
- (int) ID of current form.
Examples
This example changes the placeholder text to "Click to select your options..."
<?php
add_filter("gform_multiselect_placeholder_185", "set_multiselect_placeholder", 10, 2);
function set_multiselect_placeholder($placeholder, $form_id){
return "Click to select your options...";
}
?>
Placement
This code should be placed in the functions.php file of your active theme.
Source Code
This filter is located in common.php