bookmark_bordergform_name_first

Description

This filter is executed when creating the first name field and can be used to modify the “First” label

Usage

add_filter( 'gform_name_first', 'change_first', 10, 2 );

Parameters

  • $label string

    The label to be filtered.

  • $form_id integer

    The current form’s id.

Examples

This example changes the default first name label;

add_filter( 'gform_name_first', 'change_first', 10, 2 );
function change_first( $label, $form_id ) {
    return "First Name";
}

Source Code

This filter is located in js.php and GF_Field_Name::get_field_input() in includes/fields/class-gf-field-name.php