Posted: July 10, 2018 at 11:37 am
|
Hi, In my registration form I want the feature “USE ATTENDEE #1’S INFORMATION FOR ALL ATTENDEES” to populate only the email field of the other attendees. I understand this feature will populate every question that matches the fields in #1, so I thought of building a custom group of questions for all additional registrants where only the email field was replicated from the original group. But apparently it’s not possible to add the default email question to a custom group. Which takes me back to my question: Many thanks |
Yes there is, but it does not involve the Copy button on the registration form. Instead, you add some custom code to your site: https://gist.github.com/joshfeck/5cad70f0b927e0950b1877f9a4f18fa5 You can add the above to a functions plugin or into your WordPress theme’s functions.php file. |
|
|
Hi Josh, Thanks for the fast response, but there’s something strange happening now. I added the code to functions.php in my child theme and it just hid the email field for the other attendees. Which means the field is still in the form, it’s empty, it’s mandatory but it’s hidden. And it doesn’t let me proceed to payment options because the email field is not filled in. Is something missing in the code or am I not understanding what’s happening? Many thanks |
|
I see, the value only gets copied when I manually edit the original email field. But that’s problematic because if a logged in user makes the purchase, the email field for the first attendee is automatically filled in with their account email and it doesn’t get copied to the remaining attendees. Any way of going around this? Thanks |
|
Another issue is that I need this to be optional. |
You can add this code instead:
|
|
|
The examples were almost there. I bound the action from your example to a click and added a little button next to the original email field, to let the users chose. |
The support post ‘Use only the email value from attendee #1's information for all attendees’ 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.