Filter to uppercase/capitalize in GF 2.5

Hi.
Before, I have ever use the filter to uppercase a Name field.

I tried the code on a new form made with GF 2.5 and the field is not updated to uppercase.
Is there any change in 2.5 which make this function not working anymore or to adapt.
Best regards,

The filter works on GF 2.5 when I tested it. The snippet below should convert the value in the Name field to Uppercase.

add_filter( 'gform_save_field_value', 'uppercase_text', 10, 3 );
function uppercase_text( $value, $entry, $field ) {
    if ( $field->get_input_type() == 'name' ) {
        $value = strtoupper( $value );
    }
    return $value;
}
1 Like