Disabling a form if a url param is not present...

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