Support

Home Forums Event Espresso Premium Custom Question's Answer in Event Attendees shortcode per ticket selected

Custom Question's Answer in Event Attendees shortcode per ticket selected

Posted: July 8, 2016 at 11:01 am

Viewing 5 reply threads


phillipsdriving

July 8, 2016 at 11:01 am

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.


Josh

  • Support Staff

July 8, 2016 at 1:10 pm

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.


phillipsdriving

July 8, 2016 at 1:17 pm

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


Josh

  • Support Staff

July 8, 2016 at 2:29 pm

You add the ticket parameter to the short code like this:

[ESPRESSO_EVENT_ATTENDEES ticket_id=123456]

You’ll replace 123456 with the actual ticket ID.


phillipsdriving

July 8, 2016 at 2:34 pm

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?


Josh

  • Support Staff

July 8, 2016 at 2:48 pm

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.

Event Espresso