Page 1 of 1
disable fields
Posted: Wed Sep 07, 2005 1:36 pm
by s.dot
I want my entire form to be disabled.
This will be used simply to show a user what they filled out. I don't want them to be able to edit it or anything. So how do I go about disabling a form?
2 ways
Posted: Wed Sep 07, 2005 1:45 pm
by J_Iceman05
I am not sure if there is a way to disable the entire form in just 1 line of code, or maybe even 2.
but within each input tag you can add ' readyonly ' or ' disabled="true" '
Example:
Code: Select all
<input type="text" name="name" value="<php echo $_POST['name']?>" disabled="true">
or
<input type="text" name="name" value="<php echo $_POST['name']?>" readonly>
the only difference i can see between the 2 ways, is that in IE "disabled" greys out the box and "readonly" does not
hope that answers your question fully
Posted: Wed Sep 07, 2005 1:48 pm
by s.dot
That works beautifully. Thanks.