Hi there,
I’m using the “Enable other choice” on a radio button field. The values of the defaults are currency values. However, on the “other” field you’re allowed to enter text. Is there a way to limit this to numbers only?
I have also tried to replace the placeholder with the following code. That works, however it replaces both the placeholder AND label. Is there a way to separate (and modify) the two?
add_filter( 'gform_other_choice_value', 'set_placeholder', 10, 2 );
function set_placeholder( $placeholder, $field ) {
if ( is_object( $field ) && 6 === $field->id && 25 === $field->formId ){ // 6 and 25 to your field id and form id number.
$placeholder = 'My Custom Text';
}
return $placeholder;
}
Best,
Dave