using jquery, you can use something like the following
= check_box :object, :check
= text_field :object, :text, :style => ''display:none''
<script type=''text/javascript''>
$(''#object_check'').click(function() {
$(''#object_text'').toggle(this.checked);
});
</script>
On Fri, Feb 11, 2011 at 9:10 PM, Ollie
<ollie.judge-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
> Bit of a newbie question but I''ve got a form and I want bits of
the
> form to appear when a checkbox is clicked.
>
> So for example I have a query such as do you want to have a link
> attached to this post which is a tick box, then I have another field
> which contains the text box for the link to go in.
>
> So I want the link text box to appear when the checkbox is clicked.
> Can anyone help?
>
> --
> You received this message because you are subscribed to the Google Groups
> "Ruby on Rails: Talk" group.
> To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
> To unsubscribe from this group, send email to
>
rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
> For more options, visit this group at
> http://groups.google.com/group/rubyonrails-talk?hl=en.
>
>
--
-------------------------------------------------------------
visit my blog at http://jimlabs.heroku.com
--
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.