bookmark_bordergform_other_choice_value

Description

Use this filter to change the default “Other” placeholder text on Radio Button fields.

Usage

add_filter( 'gform_other_choice_value', 'set_placeholder', 10, 2 );

Parameters

  • $placeholder [string]

    The placeholder to be filtered. Defaults to “Other”.

  • $field [null|GF_Field_Radio]

    Null or the Field currently being prepared for display or being validated.

Examples

This example changes the placeholder text to “Enter your own value”.

add_filter( 'gform_other_choice_value', 'set_placeholder', 10, 2 );
function set_placeholder( $placeholder, $field ) {
    return 'Enter your own value';
}

Changelog

  • 2.1.1.6
    Added the $field parameter.

Placement

This code should be placed in the functions.php file of your active theme.

Source Code

This filter is located in GFCommon::get_other_choice_value() in common.php