Hiding and expanding form fields?


#1

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:

http://localhost:3000/rails_info/properties

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

Well, I must go and thanks in advance.

Peace,

-Conrad


#2

havent verified this but,

i think you can use link_to_function and have the function be something
you
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.