| View previous topic :: View next topic |
| Author |
Message |
roger06
Joined: 11 Feb 2008 Posts: 6
|
Posted: Fri Apr 18, 2008 12:53 pm Post subject: QuickForm2 checking a checkbox? |
|
|
Hi
I've created a checkbox
| Code: | $fsText->addElement( 'checkbox', 'remember_me', array('style' => 'width: 15px;'), array('content' => '', 'label' => 'Remember username?')
); |
But how do I specificity it as checked ? e.g like
| Code: | | <input name="box" type="checkbox" checked="checked" /> |
Have searched every where!!
Thanks |
|
| Back to top |
|
 |
mark

Joined: 07 Jan 2007 Posts: 1053
|
Posted: Fri Apr 18, 2008 1:58 pm Post subject: |
|
|
| It's the same as with your last question about select elements. Just set the default value of this element. |
|
| Back to top |
|
 |
roger06
Joined: 11 Feb 2008 Posts: 6
|
Posted: Fri Apr 18, 2008 2:33 pm Post subject: |
|
|
Well yes - I thought that but that didn't seem to work...
I've just gone back and had a play with it and set the value to '1' and that worked... before I was trying 'checked' and 'On'.
thanks dude!! |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|