Home › Forums › Ticket Products › Event Tickets Plus › Prepopulate Attendee Information on purchased ticket…
- This topic has 5 replies, 2 voices, and was last updated 8 years, 10 months ago by
Doyle.
-
AuthorPosts
-
May 31, 2017 at 4:33 pm #1291521
Doyle
ParticipantHi,
Would Nico be able to assist me applying this concept to the Events Tickets Plus? I would like to retrieve the current logged in user information to populate the First and Last name of the attendee automatically.
Here is the link from a previous snippet for RSVP’s.
June 2, 2017 at 5:38 pm #1292673Victor
MemberHi Doyle!
Thanks for reaching out to us! I’d be happy to help you with this 🙂
Nico is already out today, so I took a look at his gist to see how it works. With tickets to sell, this would have to be a totally different approach from that of RSVPs, and would involve some deeper customization.
In this case, attendee information would be repeated for every ticket and not just once per purchase. Do you still want to populate every attendee with the same First and Last Name? could you please tell me how would you want to address this situation? Perhaps you should only populate the first ticket? Let me know about it.
Just to set expectations right, we are fairly limited in the amount of support we can give for customizations like these. That said, we always like helping out and at least point you in the right direction. So let us know more about this and I’ll be happy to help as much I can.
Best!
VictorJune 2, 2017 at 7:37 pm #1292702Doyle
ParticipantHi Victor,
Yes, for sure the first ticket I would like to have the first and last name
auto-populated but still editable in case they want to change it. If they
put multiples in, ideally it would auto-populate the last name only or not
populate anything but the first one. I appreciate any help you can provide
to get me going in the right direction!June 5, 2017 at 9:23 pm #1293569Victor
MemberHi Doyle!
Thanks for coming back and clearing that out.
You should be able to customize the attendee fields by using the ‘event_tickets_plus_meta_fields_by_ticket’ filter like this:
add_filter('event_tickets_plus_meta_fields_by_ticket','auto_populate_ticket_fields');
function auto_populate_ticket_fields($fields, $ticket_id) {
//Do something with $fields
return $fields;
}That filter gets called inside the get_meta_fields_by_ticket() function which is used in the meta.php template file located at /wp-content/plugins/event-tickets-plus/src/views/
I know this is only as a starting point for you to customize the output of the get_meta_fields_by_ticket() function.
I hope that helps and let me know if you have questions about it.
Best!
VictorJune 27, 2017 at 9:35 am #1308787Support Droid
KeymasterHey there! This thread has been pretty quiet for the last three weeks, so we’re going to go ahead and close it to avoid confusion with other topics. If you’re still looking for help with this, please do open a new thread, reference this one and we’d be more than happy to continue the conversation over there.
Thanks so much!
The Events Calendar Support Team -
AuthorPosts
- The topic ‘Prepopulate Attendee Information on purchased ticket…’ is closed to new replies.
