Topic: Forms

How do you expose new input fields in a form depending on whether or not a check box is ticked?

Re: Forms

I got around this problem by  using :onclick  => "this.form.submit()" as an option  and then using the on_value off-values of the attribute to toggle between <div id ="id" style ="display:none"> and <div id ="id"> in the veiw.  It is not elegant.

Re: Forms

You can use a library like jQuery to observe clicks on your check box and then show/hide input fields accordingly.