Events Made Easy Forums How do I … Make a Checkbox for TOC required

Viewing 18 posts - 1 through 18 (of 18 total)
  • Author
    Posts
  • #52024
    Anonymous
    Inactive

    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 ?

    #52025
    Anonymous
    Inactive

    Sorry, its added to the “Form format” – not the “Default single event format”

    #52027
    Franky
    Keymaster

    Read 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)

    #52034
    Anonymous
    Inactive

    I did as described, added an extra field via “Events => Form fields”

    ID Title Type Value
    2 TOC CheckBox 1

    The 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 ?

    #52036
    Franky
    Keymaster

    Read the doc a little more 🙂
    You need #_REQ_FIELDxx (with xx the field id), not #_REQ_TOC

    #52045
    Anonymous
    Inactive

    Its 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.

    #52049
    Franky
    Keymaster

    Great, nice to hear it works!

    #52079
    Anonymous
    Inactive

    Sorry, 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 EMPTY

    What am i doing wrong here ?

    #52080
    Franky
    Keymaster

    When 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.

    #52081
    Anonymous
    Inactive

    I 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.

    #52082
    Franky
    Keymaster

    There’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?

    #52083
    Anonymous
    Inactive

    Thank you for having a look – i create an account and send you the details via mail soon.

    #52115
    Anonymous
    Inactive

    Dear 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 ?

    #52116
    Franky
    Keymaster

    Did you read the changelog and this: http://www.e-dynamics.be/wordpress/?p=51559

    #52124
    Anonymous
    Inactive

    I 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.

    #52126
    Franky
    Keymaster

    Did you change the settings in “RSVP: price options” to show it? You can change the payment page layout to your liking.

    #52136
    Anonymous
    Inactive

    Do you mean at EME -> Settings -> RSVP: registrations and bookings ?
    I do not find any “price options”. Do i look at the right palce?

    #52144
    Franky
    Keymaster

    In the payment options tab

Viewing 18 posts - 1 through 18 (of 18 total)
  • The forum ‘How do I …’ is closed to new topics and replies.
Scroll to Top