Support

Home Forums Event Espresso Premium Pulling data from custom questions in Registration Form into messages

Pulling data from custom questions in Registration Form into messages

Posted: September 4, 2020 at 9:29 am


Emma

September 4, 2020 at 9:29 am

Hi. We run events for children so their parents book on their behalf. However, we need to refer to the children by name in our messages to help avoid confusion. I am struggling to find these fields in any of the shortcodes.

Can you help me please?


Tony

  • Support Staff

September 8, 2020 at 3:17 am

Hi Emma,

There are 2 shortcodes you can use for this, both work in a similar way but pull the info from a different location depending on the setup first:

[PRIMARY_REGISTRANT_ANSWER_*{question_text}]

If the child questions are always assigned to the primary registrant ou can use the above shortcode. {question_text} needs to match the question text field of your question exactly, so if you have a question that is:

‘Childs First Name?’

Your shortcode would be:

[PRIMARY_REGISTRANT_ANSWER_*Childs First Name?]

The other is just:

[REGISTRANT_ANSWER_*{question_text}]

If works as above only the answers are pull from the specific registrant the message is being generated for.

If you are unsure on which would work best I’ll take a look at your set up if you link me an event I can test on.


Emma

September 8, 2020 at 4:40 am

Hi Tony, thanks for your explanation.

I don’t know which solution would work best so here’s a link to an event: https://www.sparkwriters.org/events/wolverhampton-2020-2021/ The Primary registrant might be booking for more than one child and the answers to the questions will be different, but will still be attached to the Primary Registrant?!

Thanks again,
Emma


Tony

  • Support Staff

September 8, 2020 at 5:34 am

For you set up you would need to use the [REGISTRANT_ANSWER_*] as the parent questions are asked for each attendee.

Parent/child set up’s can be a little tricky with EE as you can’t officially separate the ‘payee’ (the parent) from the primary registrant, however, it is possible to set this to work a little ‘better’ than what you have now.

I assume the ‘Parent’ will be the same for a group registration of multiple children?

Will all of your events be set up the same way?

To explain, the way you have it now, the parent is considered the ‘registrant’ (aka attendee) and EE considers them to be the one attending, that means that any details used throughout EE for the attendee will show as the parent. The children registered, aren’t technically registered, they are just custom questions assigned to the attendee (the parent) itself.

If all of your events work the same way and it is possible (and I can give you details on how to do it) to switch this around so that the ‘Child’ is the one considered attending the event and then the ‘Parent’ is setup as the custom questions. You can then alter the emails to use the parent information so they send to the parent.

It is a little more clunky to set up at the beginning but means your attendees are the children rather than the parents.

Does that sound like it will work better for you?


Emma

September 8, 2020 at 5:56 am

All our events are set up in the same way.

And yes, that would be better in the majority of cases. How would it work when there are two children attending? Would they need to complete a registration form for each child? Would we need to remove the ability to buy more than one ticket per event?

Our events are basically multi-events across 10 months of the year. Can this change be applied retrospectively? Or just with new events?

Thanks again,
Emma


Emma

September 8, 2020 at 7:39 am

Hi, I just tried to add this to the Main Content field and it has told me it is not valid. This is what I tried to add:
[REGISTRANT_ANSWER_*]{First name of Young Writer} [REGISTRANT_ANSWER_*]{Surname of Young Writer}

Did I get it wrong? Or do I need to put it ion a different part of the message?

Thanks


Emma

September 8, 2020 at 7:46 am

Apologies – I got my brackets mixed up but I tried with this: [REGISTRANT_ANSWER_*{First name of Young Writer}] too, which I think is the format you suggested above, and got an error message too (in Main Content part of message). I’m editing this message: Email Automated Upcoming Datetime Notification Template

Thanks


Tony

  • Support Staff

September 8, 2020 at 8:14 am

My apologies, you’ll need to use:

[RECIPIENT_ANSWER_*First name of Young Writer]

(Recipient rather than registrant and remove the { and }.


Tony

  • Support Staff

September 8, 2020 at 8:23 am

How would it work when there are two children attending?

The ‘Personal Information’ question group basically becomes the ‘Child info’ group so you request that group for each registrant.

You then have an additional group specifically for the parent info that you only ask for the ‘Primary Registrant’ meaning it is only asked for once.

There is a gotcha using this method in that the ’email address’ field is required for each registrant when using this setup, which would mean it asking for an email field for each child. However, you can use some jQuery to hide it and then copy the parent’s email (from the parent group) into all of the hidden fields.

Would they need to complete a registration form for each child?

Yes but you can set it up to only ask the child related questions for each registration, parent information is only collected once and not on every registration.

Would we need to remove the ability to buy more than one ticket per event?

With the exception of the email field above, there’s no reason you can’t purchase multiple child tickets. If hiding the email field and then copying email for the parent to those hidden fields is no good for your setup then the above is not suitable and you’ll need to continue using your current setup.

Our events are basically multi-events across 10 months of the year. Can this change be applied retrospectively? Or just with new events?

Hmm, this might pose an issue as you’ll need to change the personal info fields to become the child and currently they are the for the parent, changing the labels now would change the labels for previous registrations.

If you already have active events with (many?) registrations on them you may be better continue to use your current setup and then switching this over in the downtime before the next season, I guess on the current number of registrations as you may need to manually update each of those to match the ‘new’ set up.


Emma

September 8, 2020 at 8:46 am

Thanks for the update on the field coding.I’ll try that out in just a moment.

We don’t have huge numbers of registrations per event, but do have 22 events. I will work my way through your notes and see if I think I can manually make the changes. If the coding works, we may be OK as we are for this year and then change over in the spring.

I’ll update you once I’ve tested out the coding.


Tony

  • Support Staff

September 8, 2020 at 8:55 am

Each of those 22 events will need to be edited and the personal information groups updated if you use the ‘new’ setup, then any registrations on those 22 events may need to be updated so they use the correct values in the correct locations.

It’s not impossible but is best done when you have no events/registrations to update.

I’ll update you once I’ve tested out the coding.

Sure, any issues just let us know.


Emma

September 15, 2020 at 5:13 am

To confirm – the correct data was pulled into the message 🙂

Thanks for your help.


Tony

  • Support Staff

September 15, 2020 at 5:47 am

You’re most welcome, I’m glad it worked for you.


Emma

September 24, 2020 at 5:28 am

Hi again, I’m really sorry – but I have a follow up question about this topic.

I am trying to create an automated message to send to the people leading our groups. I want to give them a list of the young people who are attending the sessions, and their school year (both custom questions on the registration form), as well as the names and phone numbers of their parents (the primary registrant).

I can bring in the names and phone numbers into the Attendee List section, but the other fields [RECIPIENT_ANSWER_*First name of Young Writer] [RECIPIENT_ANSWER_*Surname of Young Writer] and [RECIPIENT_ANSWER_*Please select the school year your young writer will be in from September 2020.] can’t be brought into that section.

Is there anything we can do to fix this?

In case you want to look, here’s a link to the relevant message: https://www.sparkwriters.org/wp-admin/admin.php?page=espresso_messages&action=edit_message_template&id=47&context=admin&edit_message_template_nonce=12ab6be0c9&return=custom_mtps

Thanks
Emma


Tony

  • Support Staff

September 24, 2020 at 7:09 am

Hi Emma,

I can’t view that link but can you add a screenshot fo the section you are editing?

https://eventespresso.com/wiki/troubleshooting-checklist/#screenshots

Seems odd that only those questions don’t pull values, have you confirmed the question text and shortcode value match exactly?


Emma

September 24, 2020 at 8:18 am

I’ve copied the code that worked in other messages (main content though, not Attendee List) so I have no reason to believe that the code is incorrect.

Here’s the screenshot of the failure message: https://www.sparkwriters.org/wp-content/uploads/2020/09/Message-sshot-2.png

And here’s the screenshot of my attempt to add the extra information into the Attendee List: https://www.sparkwriters.org/wp-content/uploads/2020/09/Message-sshot-1.png

Hope that gives you an idea.
Thanks,
Emma


Tony

  • Support Staff

September 24, 2020 at 8:56 am

`Within that section you are already within each individual registrant context, so wee in screenshot 2 which shows the shortcodes are invalid it also shows the valid shortcodes for that section.

3rd one from the last is [ANSWER_*]

In short thats the answer related to each specific attendee, so you need to use:

[ANSWER_*First name of Young Writer] [ANSWER_*Surname of Young Writer]

Same for the other:

[ANSWER_*Please select the school year your young writer will be in from September 2020.]

It all depends on the specific sections you are adding the code to and what data that section has access to.


Emma

September 25, 2020 at 1:53 am

Ah! Thank you. It’s very confusing from this perspective!

Hopefully that’s got it cracked now. I’ll wait until I get the notification and update this page or ask more questions!


Tony

  • Support Staff

September 25, 2020 at 3:01 am

When you think about it in the context of the message that is sending it makes a little more sense.

In this example you are editing the Event Admin context, so the ‘Recipient’ of that message is the admin, not the registrant.

Meaning the [RECIPIENT_ANSWER_*] would be looking for an answer from the Event Admin, which won’t exist. SO in the ATTENDEE_LIST section you are looping over the related attendees and outputting whatever is in that section for them. The shortcodes then parse in relation to each individual attendee, so then [ANSWER_*] is for that specific attendee in the loop.

You must be logged in to reply to this support post. Sign In or Register for an Account

Support forum for Event Espresso 3 and Event Espresso 4.
Documentation for EE3 and EE4
Documentation for Event Espresso 3 Documentation for Event Espresso 4

Status: publish

Updated by  Tony 1 month ago ago

Topic Tags

Notifications

This topic is: not resolved
Do NOT follow this link or you will be banned from the site!