Disable form element input?

I’ve scoured the docs, wiki and forum and haven’t found out how to do a seemingly simple thing – set a form element’s disabled property. I’m using ActiveForm/Field and want to disable field nput by default, and then use JavaScript to enable it depending on user input in other fields. I know how to do the latter so worst case I’ll write a JS routine to disable the field on document ready, but I figured there must be some way to do this in my view code, just haven’t been able to figure out how. Any pointers will be much appreciated!

Figured it out after numerous experiments:


Note that true is not contained within single quotes.