I want to make the check box checked, and Non Editable/Non Selectable

Step 1. checked the check box only
from this tutorial page hscripts.com/tutorials/html/form-checkbox.phpits working checked by add entry "checked" in bold below, and the form working with the check box checked after click submit button :

<input type="checkbox" checked name="postpoll" value="yes" id="cb_postpoll" tabindex="1" $checked[postpoll] />

Step 2. make it Non Editable/Non Selectable, so the check box are already checked and cannot unchecked by users

from that same tutorial page its says to add entry "disabled" like below in bold

<input type="checkbox" checked disabled name="postpoll" value="yes" id="cb_postpoll" tabindex="1" $checked[postpoll] />

its working the check box being Non Editable/Non Selectable, but after click submit button the form are not working maybe because the check box really disabled, its just pass the checked check box, like there is no check box. Maybe using entry "disabled" is the wrong way

please help guys, how to make the form still working after click submit button, but the check box are already checked and cannot unchecked by users
use "readonly" instead of "disabled"

ok i already tried readonly="readonly" is not working

somebody suggest this in bold, i think this is the best way if i know how to do that, any body know how to do that?

Why do you need to show such a checkbox in this case? If it’s to checked and cannot be altered, then can’t you just assume the value of $postpoll as yes, in the serverside?

FYI: There’s nothing permanent when it comes in the client side. Users can easily manipulate the html code from their browser using tools like firebug.

here is again the code

<input type="checkbox" checked name="postpoll" value="yes" id="cb_postpoll" tabindex="1" $checked[postpoll] />

You don’t need readonly="readonly". Just "readonly"

Leave a Reply

(required)

(required)

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

© 2011 Tag ORDA - Webmaster Lab Suffusion theme by Sayontan Sinha