Events Made Easy Forums Generic Fields like #_COMMENT or #_SPACES not shown in custom forms

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #63573
    Anonymous
    Inactive

    Hi, following custom form I use as booking- and cancellation-form in an event. When I display my booking for cancellation, I see Field-placeholders like #_COMMENT or #_SPACES rather than the content of these fields. Any ideas? Thank you!

    Code for custom form:

    <div>
    <table class=”table table-sm table-responsive”>
    <tbody>
    <tr><th scope=”row”>Nachname</th><td>#_LASTNAME</td></tr>
    <tr><th scope=”row”>Vorname</th><td>#REQ_FIRSTNAME</td></tr>
    <tr><th scope=”row”>E-Mail-Adresse</th><td>#_EMAIL</td></tr>
    <tr><th scope=”row”>Anlass</th><td>#_LINKEDNAME am #_STARTDATE um #_STARTTIME</td></tr>
    <tr><th scope=”row”>#_FIELDNAME{Anmeldung}</th><td>#_FIELD{Anmeldung}</td></tr>
    <tr><th scope=”row”>Reservierte Plätze</th><td>#_SPACES</td></tr>
    <tr><th scope=”row”>#_FIELDNAME{Name PartnerIn}</th><td>#_FIELD{Name PartnerIn}</td></tr>
    <tr><th scope=”row”>Bemerkungen:</th><td>#_COMMENT</td></tr>
    </tbody>
    </table>
    </div>
    #_SUBMIT

    What I see when I show my booking, some #_xxxx fields not resolved

    Nachname My-Lastname
    Vorname My-Firstname
    E-Mail-Adresse My-Email
    Anlass Test Partnerin am 11. Dezember 2021 um 12:00
    #_FIELDNAME{Anmeldung} #_FIELD{Anmeldung}
    Reservierte Plätze #_SPACES
    #_FIELDNAME{Name PartnerIn} #_FIELD{Name PartnerIn}
    Bemerkungen: #_COMMENT

    #63574
    Anonymous
    Inactive

    Edit: The “show my booking in above text” with the onresolved placeholders is done with EME-Settings / Events / Format for single event / #_ADDBOOKINGFORM_IF_NOT_REGISTERED #_REMOVEBOOKINGFORM_IF_REGISTERED<br />

    #63575
    Franky
    Keymaster

    When cancelling a booking, #_SPACES etc … are not relevant info.
    See here for the placeholders you can use in the cancel booking form:
    https://www.e-dynamics.be/wordpress/category/documentation/7-placeholders/7-7-cancel-all-bookings-form-fields/

    #63576
    Anonymous
    Inactive

    Thanks for the quick reply, Franky!
    As stated in my edit above, I use the placeholder #_REMOVEBOOKINGFORM_IF_REGISTERED in the EME-Settings – Format – single event. When I then display a single event on the defined “Eventspage”, #_COMMENT etc. is not resolved. That worked before in a version 2.1xxx (I havent updated the versions for 12 months or so), but now after the update today, it does not work any more. ??

    #63578
    Franky
    Keymaster

    The cancel booking form has always been more limitative in placeholders. In the past maybe placeholders that weren’t recognized got replaced by empty strings (but that doesn’t happen anymore to avoid issues when including shortcodes inside other shortcodes etc).
    So the cancel form should only contain the supported placeholders, nothing more.

    #63580
    Anonymous
    Inactive

    Found and cleared the issue. I have a custom placeholder which queries wp_eme_answers table with “WHERE booking_id=1234”, but the db-field “booking_id” does not exist. I changed the quuery to “WHERE related_id=1234”, now it works as before.

    For curiosity: Did that fieldname change? Anyway: Close the ticket as resolved, and thanks for your plugin and your 5* support.

    #63581
    Franky
    Keymaster

    That indeed changed a number of versions ago. If needing to find the answers of a booking, the function call eme_get_booking_answers($booking_id) is recommended (your query is not limiting itself enough, you’d need to use type=’booking’ too).

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