fredep57 — 2011-03-24T00:18:17-04:00 — #1
OK, lets say I have a checkbox for, say, agree to terms. BUT, I have a form that has required information that has to be validated against some conditions.
Now, my problems are
So, for the sake of argument, my code is something like:
<input type="checkbox" name="waiverAgree" value="<?= htmlentities($values['waiverAgree']) ?>" />
How can I call my function VerifyForm(&$values, &$errors) where $values['waiverAgree'] needs to be processed. Or... am I trying something really different or far out??
tejash — 2011-03-24T00:42:47-04:00 — #2
where you want to check status of your checkbox on clientside or on serverside. ?
Anyways just make one hidden input (textbox) and save value or status in there.
So latter on you can check what was the last status of the checkbox.
fredep57 — 2011-03-24T00:54:29-04:00 — #3
OK..... now can you give me an example of that as I don't quite understand what exactly you are aluding to.
tejash — 2011-03-24T01:58:43-04:00 — #4
As i understand you want to take some action on status of checkbox. I mean its selected or not selected . And if selected than what value was there. right?
If so than what you can do is, create one hidden textbox.
Now whenever you want to check want happened, you can retrieve value of textbox. If its empty than nothing was checked. If there is some value than on base of value you can decide what further action you want to perform.
fredep57 — 2011-03-24T09:47:26-04:00 — #5
Is there a PHP way of doing this? I think someone has done it in PHP only but can't find anything on the web that relates to it.
Thanks and still looking for a good example, tutorial, etc. to SHOW me what and how to do this.