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

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.
ressister (Guest)
on 2008-10-07 02: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.

This topic is locked and can not be replied to.