Forum: Ruby on Rails Hiding and expanding form fields?

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Conrad T. (Guest)
on 2006-03-04 09:16
(Received via mailing list)
Hi, I'm wanting to create a form where some of the for fields are
hidden until the user clicks the advanced link.  BTW, I'm looking for
the functionality similar to the Rails Welcome page (i.e.
http://localhost:3000).  The relevant link hear is as follows:


In short, it seems to be a expand and collapse functionality using
AJAX.  However, I'll be using form elements instead.  For example,

<input type="text" name="my_text_field" value="" size="20" />

Well, I must go and thanks in advance.


Manish S. (Guest)
on 2006-03-04 10:38
(Received via mailing list)
havent verified this but,

i think you can use link_to_function and have the function be something
define.  I think you can define it right there using function() {
Element.toggle(your_input_element); Element.toggle(some other element) }

Or you could just write a custom function and have it referenced in the
link_to_function call.
This topic is locked and can not be replied to.