-
- 615 Posts
I can check a checkbox, but as soon as the form validation fails the checked checkboxes gets unchecked. My call is:
[[!FormIt? &hooks=`spam,email,redirect` &emailTpl=`KursYoga` &emailTo=`[email protected],[email protected]` &emailSubject=`Påmelding til Yogakurs` &redirectTo=`13`]]
<h2>Kryss av for valgt kurs</h2>
<p>[[+fi.error.error_message]]</p>
<form action="[[~[[*id]]]]" method="post" class="form">
<input type="hidden" name="nospam:blank" value="" />
<input type="checkbox" name="k1" id="k1" value="1" [[+fi.k1:notempty=`checked="checked"`]] />
<input type="submit" value="Send påmelding" />
</form>
Is there a way to make the checked boxes still be checked after validation failure?
MODx Rev 2
FormIt 1.1.7 pl
Thanks.
I think, thererfor I am! But what I am, and why...?
-
- 615 Posts
Thank you for your answer.
Unfortunately it didn’t help. If you want to take a closer look, you can see it here:
verketyoga.no/p%C3%A5melding.html/ (I’m not done styling it yet). (Please don’t send a validated form.)
I think, thererfor I am! But what I am, and why...?
-
- 615 Posts
Sorry, and thanks.
It’s there now.
http://verketyoga.no/p%C3%A5melding.html (Added the link in this post to day for easier access.)
I think, thererfor I am! But what I am, and why...?
-
- 659 Posts
I can’t see the link... Same player shoot again ? Sorry it’s in your previous post ! I got it
-
- 615 Posts
Thanks again so much for your help. Unfortunately it still doesn’t work. (The code <input type="hidden" name="k1:notempty=`checked="checked"`" value=""]] /> was something I tried after I tried your code.
One good side-effect: the validation for checkboxes, as you described it, works.
I think, thererfor I am! But what I am, and why...?
-
- 659 Posts
Hello,
What else exactly does not work ? Or what is what you expect?
I understood you had a problem with keeping the checkboxes checked if validation fails, that’s done...
Cheers
-
- 615 Posts
No, thats exactly whats wrong, the checkboxes doesn’t stay checked. When I click (check) for example K1, and then click Submit, the validation-error messages comes, AND the checked K1 gets unchecked. And I want it to stay checked (of cource)
.
I think, thererfor I am! But what I am, and why...?