Events Made Easy › Forums › How do I … › Make a Checkbox for TOC required
Tagged: checkbox, required field, TOC
- This topic has 17 replies, 2 voices, and was last updated 10 years, 6 months ago by Franky.
-
AuthorPosts
-
Wed 23 Apr 2014 at 00:25 #52024AnonymousInactive
Hi,
how can i make a ceckbox a required field? I added at checkbox to my “Default single event format” as follows:
[:en]<h2>Booking Form</h2> <table class='eme-rsvp-form'> <tr><th scope='row'>Your Full Name*:</th><td>#_NAME</td></tr> <tr><th scope='row'>Your E-Mail*:</th><td>#_EMAIL</td></tr> <tr><th scope='row'>Phone (optional):</th><td>#_PHONE</td></tr> <tr><th scope='row'>Number of Persons*:</th><td>#_SEATS</td></tr> #_CAPTCHAHTML[<tr><th scope='row'>Please fill in the code displayed here:</th><td>#_CAPTCHA</td></tr>] <tr><td colspan="2"><label> <input type="checkbox" name="agb" id="agb" /> </label> I accept the <a href="#toc">terms of condition.</a><br>The payment system will show you the booking details and in the next step you can pay via credit card or Paypal. #_SUBMIT</td></tr> </table>
How can i make the ckeckbox required so a message is displayed when it has not been clicked ?
I also think it would be good to have an option to add a required checkbox in the plugin options because in nearly every country a TOC (Terms of Condition) is needed in any shop. Actually i did not found this function – did i missed it ?
Wed 23 Apr 2014 at 00:29 #52025AnonymousInactiveSorry, its added to the “Form format” – not the “Default single event format”
Wed 23 Apr 2014 at 00:39 #52027FrankyKeymasterRead this for the correct method of adding extra fields: http://www.e-dynamics.be/wordpress/?cat=44
It also explains what to use to make those extra fields required (hint: #REQ_FIELDxx placeholder)Wed 23 Apr 2014 at 14:32 #52034AnonymousInactiveI did as described, added an extra field via “Events => Form fields”
ID Title Type Value
2 TOC CheckBox 1The i added the code to my Form Format at RSVP (tried #REQ_ and without)
[:en]<h2>Booking Form</h2> <table class='eme-rsvp-form'> ...... <tr><th scope='row'>Number of Persons*:</th><td>#_SEATS</td></tr> <tr><th scope='row'>I have read and accept the Terms of Condition</th><td>#REQ_TOC</td></tr> <tr><th scope='row'>I have read and accept the Terms of Condition.</th><td>#_TOC</td></tr> ........
Sadly both do not work, there is no checkbox (only my HTML checkbox) at
http://www.brementourguide.com/events/4/marktplatz-and-dom-english-tour/?lang=en
Did i something wrong ?Wed 23 Apr 2014 at 14:43 #52036FrankyKeymasterRead the doc a little more 🙂
You need #_REQ_FIELDxx (with xx the field id), not #_REQ_TOCWed 23 Apr 2014 at 22:17 #52045AnonymousInactiveIts not abour reading – its about understanding 🙂
As a not-native speaker the one sentence “how to do it” condensed descriptions can be difficoult to understand 🙂 Also i am not a programmer by education. But with you help this problem could be SOLVED fast – thank you! Works fine.Wed 23 Apr 2014 at 23:11 #52049FrankyKeymasterGreat, nice to hear it works!
Mon 28 Apr 2014 at 23:08 #52079AnonymousInactiveSorry, i am still a bit confused. The checkbox reacts as required but i get a required message if the box is clicked or not – in both cases.
I use the code in my form:
<tr><th scope='row'>I accept the<br><a href="#toc">terms of condition.</a></th><td>#REQ_FIELD2</td></tr>
and the Field info for ID2 is:
Field name: Terms of condition
Field type: Checkbox
Value: LEFT EMPTYWhat am i doing wrong here ?
Mon 28 Apr 2014 at 23:23 #52080FrankyKeymasterWhen defining the field, make sure you give it at least one value. If no value, then the form doesn’t know what to do with it either and the value will be empty.
The next version will give a warning if no values are given for checkboxes or radioboxes.Tue 29 Apr 2014 at 02:18 #52081AnonymousInactiveI gave it the value “please select” and it is shown directly next to the checkbox, without a seperating space (design thing…). But still – if box is checked or not – i get the message to fill it out.
Also i mentioned that when i try to use the “[:en]Terms of Condition[:de]German content” code form as Field name i get a visual problem on the english page – my template design was displaced, the side menu showing on the bottom page (several times tested).
Do this fields support multilanguage code ? Because the Field name is used in the error code this would be needed for showing my german customers the right field name in the error message.
Tue 29 Apr 2014 at 10:17 #52082FrankyKeymasterThere’s an ongoing feature request for making the field names also language-sensitive. For now it is not possible, I’ll try to work on it next.
But the weird thing in your form is this generated html code:
<input type="checkbox" value="Please select" name="[]">
You see the name issue there?
Can you post your complete RSVP form description? And your field definition? Or give me a temp admin account so I can check for myself?Wed 30 Apr 2014 at 00:32 #52083AnonymousInactiveThank you for having a look – i create an account and send you the details via mail soon.
Sun 4 May 2014 at 00:38 #52115AnonymousInactiveDear Franky, after todays update the TOC checkbox works, thank you for working there.
Sadly the booking details do not show up (total price if more than one seat is booked) after using Submit at the booking form. Is this because of the checkbox ?
Sun 4 May 2014 at 01:11 #52116FrankyKeymasterDid you read the changelog and this: http://www.e-dynamics.be/wordpress/?p=51559
Mon 5 May 2014 at 02:19 #52124AnonymousInactiveI did – in the changelog i did not found a tip for my issue that the final booking details are not shown.
I saw the syntax change but did not wanted to chage so far because you write
“… you’re still allowed to use them so as to give you the time needed to switch to the new syntax.” and i thought its better to check the problem in the configuration when it appeared.I now changed the Syntax to #REQ_FIELD{2} and the required function works fine.
But i still do not get a booking total (total price) after submitting the booking form.Mon 5 May 2014 at 09:54 #52126FrankyKeymasterDid you change the settings in “RSVP: price options” to show it? You can change the payment page layout to your liking.
Mon 5 May 2014 at 22:23 #52136AnonymousInactiveDo you mean at EME -> Settings -> RSVP: registrations and bookings ?
I do not find any “price options”. Do i look at the right palce?Tue 6 May 2014 at 10:09 #52144FrankyKeymasterIn the payment options tab
-
AuthorPosts
- The forum ‘How do I …’ is closed to new topics and replies.