disable :: Form

disable(formElement) -> HTMLFormElement Disables the form as whole. Form controls will be visible but uneditable.

Disabling the form is done by iterating over form elements and disabling them.

Example

<form id="disable-example" class="example" action="#">

<input type="text" name="username" id="username" value="Sulien">

<input type="text" name="age" id="age" value="23" size="3" >

<button type="submit">Send</button>

</form>

$('disable-example').disable();

Note

Keep in mind that disabled elements are skipped by serialize methods! You cannot serialize a disabled form.

Prototype API 1.5.0 - prototypejs.org