The gform_other_choice_value Gravity Forms filter allows you to change the default “Other” placeholder text on Radio Button fields.
Usage
add_filter('gform_other_choice_value', 'your_function_name', 10, 2);
Parameters
- $value (string): The default value of the “Other” choice input.
- $field (null | GF_Field): Null or the Field currently being prepared for display or being validated.
More information
See Gravity Forms Docs: gform_other_choice_value
Examples
Change “Other” text for all fields
This example changes the “Other” text to “Enter your own value” for all fields.
add_filter('gform_other_choice_value', function($value, $field) { return 'Enter your own value'; }, 10, 2);
Change “Other” text for a specific field on a specific form
This example changes the “Other” text to “My Custom Text” only for a field with id 6 that is added to a form that has id 25.
add_filter('gform_other_choice_value', 'set_other_choice_value', 10, 2); function set_other_choice_value($value, $field) { if (is_object($field) && 6 === $field->id && 25 === $field->formId) { $value = 'My Custom Text'; } return $value; }
Note: This code should be placed in the functions.php
file of your active theme.