Forum: Ruby on Rails Disabling a form if a url param is not present...

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
708000cf4928013787823c10427136fc?d=identicon&s=25 ressister (Guest)
on 2008-10-07 00:23
(Received via mailing list)
Hi there, I've used Javascript in the past to disable form fields, but
I'm wondering if there's a way to easily do this with Rails during the
page generation.

In my app, i have a page that has a form.  I want to disable the form
if a set of URL parameters are not present.  I could perhaps do some
javascript onload function that disables all the form fields, or add
conditional logic to the rails template which would be messy.

What's the best way to handle this?  I have about 6 fields in the form
that I want disabled if the url params aren't present.

Thanks,
-A
This topic is locked and can not be replied to.