bsf
(bsf)
1
I am currently using:
add_filter( 'gform_other_choice_value', 'set_placeholder', 10, 2 );
function set_placeholder( $placeholder, $field ) {
return 'XXXXX';
}
to change the placeholder text of the “Other” option of a radio button question.
However, this snippet changes all the placeholders for all the radio button questions! How can I modify this snippet to only target individual fields?
Thanks in advance!
chrishajer
(Chris (Gravity Forms))
2
Hello. The $field
object contains the form ID, so you can do something like this (courtesy of @spivurno of GravityWiz):
2 Likes
bsf
(bsf)
3
Perfect, thanks! This works and should be included somewhere in the documentation, if you ask me.
1 Like
chrishajer
(Chris (Gravity Forms))
4
Good point! I’ll recommend it. Thanks to David Smith for that one.
2 Likes