Web Advertising - Myspace Layouts - Reno Nevada Real Estate - William Hill Vouchers - Gavin Newsom

PDA

View Full Version : keep checkbox checked


ultimategp
Jan 2nd 2007, 7:18 pm
hi in a php proxy for example www.privacynest.com how can i by default keep the part where it says 'include min URL-form- checked no matter what?

trevlar
Jan 2nd 2007, 8:13 pm
Change

<input name="ops[]" checked="checked" type="checkbox">

to

<input name="ops[]" checked="checked" type="checkbox" disabled="disabled">

ultimategp
Jan 2nd 2007, 8:46 pm
but i have to keep a specific box checked dont know how to put that code in for it

weknowtheworld
Jan 2nd 2007, 9:45 pm
trevlar is correct..

ultimategp
Jan 2nd 2007, 10:05 pm
but i dont know where i shuld place the code like do i just place it anywhere?

trevlar
Jan 3rd 2007, 7:50 pm
but i dont know where i shuld place the code like do i just place it anywhere?

No, you replace the current one with the one I provided.

Change
<input name="ops[]" checked="checked" type="checkbox">

to

<input name="ops[]" checked="checked" type="checkbox" disabled="disabled">

LongHaul
Jan 3rd 2007, 8:13 pm
As an aside to this, what's with the brackets in "ops[]"? I didn't know you could do that in a form, what exactly does it do?

solidphp
Jan 4th 2007, 9:08 pm
The [] makes it an array. It let's your end user check more than one box. If you left off the [], only the last checked box would register.