Page 1 of 1
checkbox on my form
Posted: Fri Jun 01, 2012 10:28 pm
by johan
Hi,
I wan't to add some checkbox on my form. I've tried html
Code: Select all
<input type="checkbox" name="box1" value="1" />
Now I see my checkbox but how can I write 1 to my database when checked and 0 when unchecked?
Johan
Re: checkbox on my form
Posted: Wed Jun 06, 2012 3:25 am
by shane
to do this you will need to create another (hidden) field on the screen and using a bit of JavaScript update the hidden field with the result of the tick-box, this way the value will be set through to be saved.
You will also need to have some JavaScript to populate the tick-box when the screen loads.
Alternatively you could just simple use a yes/no drop down and then you wouldn't need all of the above.
Re: checkbox on my form
Posted: Wed Jun 06, 2012 9:12 am
by johan
Shane,
Thanks for your reply.
Now I know what to do.
Johan
Re: checkbox on my form
Posted: Fri Jul 06, 2012 11:54 pm
by admin
.