This may seem like a bit of a silly question, but here’s the reason:
I have an app where a large number of options may need to be selected.
Some are simply on/off with a checkbox but others have an additional
text input field associated with them. This is OK if users read the
instructions or they only select an on/off option, but sometimes for the
options with additional text they simply type into the input field and
neglect to tick the box as well. One way around this would be to
re-write the code to remove the requirement for checkboxes on
everything, but before doing that I would like to try using
observe_field to tick the box if they start typing text in the field. Is
that possible?
So far I have something like this:
<%= observe_field “text_input[#{parameter}]”, :update =>
“check_box[#{parameter}]”, :parameters => 1, :frequency => 0.5 -%>
This does not work. Is anyone able to suggest how this might be fixed?
Thanks.