I was looking at the documentation on this page: https://eventespresso.com/wiki/ee4-shortcodes-template-variables/#custom-attendee-list on how to set up custom question’s answers in the ESPRESSO_EVENT_ATTENDEES Shortcode, and I am wondering how do I specifically target the ticket they have selected. When using the github code it loops through the entire ticket list. I just want to target each ticket ID.
I’m not quite sure what you’re looking to do when you mention target each ticket ID, but you do have access to the $ticket object since that’s passed into the template.
I have several tickets for each event and when I select a ticket and finish registration, I go back to the event and I see my custom question answer on all the tickets and not the ticket it was selected from. How do I just target the specific ticket? Do I call it in $prev_answer_value? or outside of that? How do I show the custom question answer to the specific ticket ID
Can parameter be dynamic? Let’s say I have 5 different tickets for the event and the custom question answer is School. So when the first person registers for ticket 1, that school will be used as the “Meet Up” place for the following people who purchase Ticket 1. And so on and so forth for Ticket 2, 3, 4, and 5. But the meet up will be left blank until the first person registers. Does that make sense?
The shortcode parameter needs a valid ticket ID. If you are using a template with do_shortcode then it should be possible to write some PHP to dynamically add the ID, but you’ll still need a way to get that ticket’s ID and pass it to the short code.
Viewing 5 reply threads
The support post ‘Custom Question's Answer in Event Attendees shortcode per ticket selected’ is closed to new replies.
Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.
Support forum for Event Espresso 3 and Event Espresso 4.