Events Made Easy › Forums › Generic › Fields like #_COMMENT or #_SPACES not shown in custom forms
- This topic has 6 replies, 2 voices, and was last updated 2 years, 11 months ago by Franky.
-
AuthorPosts
-
Sat 11 Dec 2021 at 10:59 #63573AnonymousInactive
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>
#_SUBMITWhat 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: #_COMMENTSat 11 Dec 2021 at 11:19 #63574AnonymousInactiveEdit: 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 />
Sat 11 Dec 2021 at 11:35 #63575FrankyKeymasterWhen 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/Sat 11 Dec 2021 at 11:47 #63576AnonymousInactiveThanks 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. ??Sat 11 Dec 2021 at 14:57 #63578FrankyKeymasterThe 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.Sat 11 Dec 2021 at 16:41 #63580AnonymousInactiveFound 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.
Sat 11 Dec 2021 at 17:44 #63581FrankyKeymasterThat 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).
-
AuthorPosts
- The forum ‘Generic’ is closed to new topics and replies.