Hi Guys,
First of all thnx for RC2!
My question concerns validation for a checkbox. I would like to do the following. at the end of the form they have to check a box, if it is not checked it shouldn't send the resultsmail. Something like;
i agree [Checkbox]
send - reset
i've used the built-in validation (mootools) and all the others work perfect! Just the checkbox... I've tried # 11 and # 12.
any ideas?
Grtz,
Raymon
First of all thnx for RC2!
My question concerns validation for a checkbox. I would like to do the following. at the end of the form they have to check a box, if it is not checked it shouldn't send the resultsmail. Something like;
i agree [Checkbox]
send - reset
i've used the built-in validation (mootools) and all the others work perfect! Just the checkbox... I've tried # 11 and # 12.
any ideas?
Grtz,
Raymon
mmmm, try making the checkbox as "required" ? try with the checkbox has a value attribute and when it does not too!
Sorry, Admin i don't understand your reply. Could you explain in different words?
just put the checkbox field name in the "required" text field lik any other text field, doest his get it to work ?
Nope...
code in the form:
And i put "algvoorwaarden" in with the required - validation.
Still the mail gets send if left unchecked.
Thnx Again!
code in the form:
<td colspan="2"><label for="algvoorwaarden"><br />Ik ga akkoord met de <a href="images/stories/docs/leveringsvoorwaarden.pdf" target="_blank">algemene leveringsvoorwaarden</a> <input name="algvoorwaarden" type="checkbox"/>
</label></td>
And i put "algvoorwaarden" in with the required - validation.
Still the mail gets send if left unchecked.
Thnx Again!
Hi Raymon,
I just checked this and the validation works OK for me - though the error message shows up below the Submit button which is a bit odd. I just put your input tag into a copy of the test form using Joomla 1.0.x
Bob
I just checked this and the validation works OK for me - though the error message shows up below the Submit button which is a bit odd. I just put your input tag into a copy of the test form using Joomla 1.0.x
Bob
Aha... Sorry Bob I should have been more specific.
Joomla! 1.5.0
ChronoForms 2.5 J1.5 RC2
Could you test this aswell?
Thnx,
Raymon
Joomla! 1.5.0
ChronoForms 2.5 J1.5 RC2
Could you test this aswell?
Thnx,
Raymon
Hi Raymon,
Just the same in Joomla 1.5.1 - see the image.
Bob
<br><br>Post edited by: GreyHead, at: 2008/03/12 12:32
Just the same in Joomla 1.5.1 - see the image.
Bob

Oke? Weird, lets see if we can find the differences. I made a new/clean form:
Again the validation works for Name, but when i don't check the box it still sends the mail.
I've attached a img with the validation config.
<br><br>Post edited by: Raymon, at: 2008/03/12 13:20
<label for="name">Name</label> <input type="text" name="name" id="name" /> required<br />
<label for="age">Age</label> <input type="text" name="age" id="age" />
<p>I am <label for="happy">happy</label>
<input type="checkbox" name="happy" id="happy" /> required
</p>
<p><input name="submit" type="submit" /><input name="reset" type="reset" /></p>
Again the validation works for Name, but when i don't check the box it still sends the mail.
I've attached a img with the validation config.

Hi Raymon,
It works with Prototype but not with Mootools - a bug in the MooTools code I guess. I wonder if there is an updated version?
Max ???
Bob
It works with Prototype but not with Mootools - a bug in the MooTools code I guess. I wonder if there is an updated version?
Max ???
Bob
Check!
Bob, Max I can confirm the checkbox validation works with "Prototype" and not with "Mootools". But this does not apply to Internet Explorer 6.0??? With IE6.0 all of the validation doesn't work! And i get an "Done, but with error on the page"
We're almost there...
Raymon
Bob, Max I can confirm the checkbox validation works with "Prototype" and not with "Mootools". But this does not apply to Internet Explorer 6.0??? With IE6.0 all of the validation doesn't work! And i get an "Done, but with error on the page"
We're almost there...
Raymon
Hi Raymon,
The IE6 problem is most likely a JavaScript conflict. They aren't easy to pin down! Try loading the form using the link shown in ChronoForms but replacing index.php with index2.php This should remove anything else on the page.
If it works OK then you cna try checking what other JS is in the usual page.
Bob
The IE6 problem is most likely a JavaScript conflict. They aren't easy to pin down! Try loading the form using the link shown in ChronoForms but replacing index.php with index2.php This should remove anything else on the page.
If it works OK then you cna try checking what other JS is in the usual page.
Bob
oke, when using the index2 in IE6.0 only the textbox validate works a bit. Really weird if I leave all the fields empty, you can just see the validate error apear when it goes on to the next page and send the resultsmail. So the only thing with index2 that works is the error message briefly it still sends the resultsmail.
If you need more or specific info just let me know.
If you need more or specific info just let me know.
Hi Raymon,
IE6 is really not very good with JS, try to clear your cache ? if this doesn't work then I don't know about any other way for this to work on IE6, you can google "real easy validation with prototype" and check for IE6 problems!
Cheers,
Max
IE6 is really not very good with JS, try to clear your cache ? if this doesn't work then I don't know about any other way for this to work on IE6, you can google "real easy validation with prototype" and check for IE6 problems!
Cheers,
Max
This topic is locked and no more replies can be posted.