Events Made Easy Forums Generic Bookings are not accepted with emmpty message

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #56962
    Anonymous
    Inactive

    Hi,

    On my site bookings are not being accepted. An empty orange box is being shown.

    Request looks like this:

    email:	bob@example.com
    eme_ajax_action: add_bookings
    eme_event_ids[]: 5
    eme_is_multibooking: 0
    eme_multibooking_tpl_id: 0
    eme_register_empty_seats: 0
    eme_rsvp_nonce: d86ee5bbdd
    eme_rsvpcomment: 
    FIELD3	https://example.com
    honeypot_check: 
    lastname: wp-user
    only_if_not_registered: 1
    phone: 

    Reply form server is the following: {"result":"NOK","htmlmessage":""}

    I tried to trace the issue. I ended up inside of eme_multibook_seats function. There’s a look over all events (only one in this case) and the event processing being skipped because the following check fails: !isset($_POST['bookings'][$event_id]).

    I’m not sure what the logic is behind this. The bookings is clearly not sent in the request.

    Please advice.

    #56964
    Franky
    Keymaster

    Well, an empty htmlmessage is weird … I’ll check
    For the rest, the for-loop it skips is indeed the one for multibookings, so that part is ok.

    #56965
    Franky
    Keymaster

    Hmm …. well, my comment might be wrong. I’ll test first.

    #56966
    Franky
    Keymaster

    Well, I just checked the code, and the bookings-array should always be there.
    Is this a special type of event? Or empty seats booked? Can you check the html via firefox debugger to see if in the received html the following field is defined:
    bookings[5][‘bookedSeats’]
    ?
    And/or a public example I can check?

    #56967
    Anonymous
    Inactive

    I think I’ve found the issue. In my form seats field was conditionally included. Like this:
    [eme_if tag='#_IS_MULTISEAT' value='1']<label><span>Seats</span> #_SPACES</label>[/eme_if]

    I thought it was not required for single-seat bookings. Apparently, I still have to include it to have bookings[] in my request.

    Consider this a viable workaround. Still consider adding extra form validation or default value for single-seat bookings.

    #56968
    Franky
    Keymaster

    EME does validation that #_SEATS (or #_SPACES) is present in your template, but before doing eme_if-validations.
    Now: EME can also hide this for you: just set the min seats to book to 1 and mark it as an attendance event. Maybe I’ll expand that logic in the future even: if min and max are equal, it can also be hidden …

    #56975
    Anonymous
    Inactive

    It does hide the field itself but the associated markup (e.g. label) is not hidden so form doesn’t look right for single-seat bookings. That’s why I used conditional.

    #56978
    Franky
    Keymaster

    Why not just use a separate rsvp template for that event? That way you can just put #_SEATS somewhere (without label), indicate “attendance” for the event and be done with it 🙂

Viewing 8 posts - 1 through 8 (of 8 total)
  • The forum ‘Generic’ is closed to new topics and replies.
Scroll to Top