Posted: October 26, 2017 at 8:44 am
|
Hello, I created an event where parents can register their children. for the primary registrant they have to enter the name & email of the parents and the name of one child. (For children i created an extra question group). For all other registrants they only have to enter the name. But in the atendee list, for each child is shown the name of the parent. How can i fix this? greetings |
Hi there, If you want the child to show as the registrant, you need to request the ‘Personal Information’ question group for additional registrants, you can’t collect the child details using custom questions. You can then use some jQuery to hide the email question for additional registrants and copy the primary registrant’s value into them all (email is required so you can’t just remove it completely). There is a function for doing that here: https://gist.github.com/Pebblo/44f47386d1221b7916d3ae906f6149c3 You can add that to a Custom Functions Plugin on your site. |
|
|
Hello, Is it possible to take the email from an other question into the database? The first atendee has for example also the question group “parent” and the answer of the question “email” in this group should be the main email address of this registration. I hope my thinkings are clear |
No. When you had the plugin activated with the code that Tony shared with you, did you check to see if the jQuery code was embedded into the page source? If you can reactivate the plugin that has the |
|
|
Hello,
|
We want to confirm the code is actually running on your event page, so if you have disabled the plugin that has the code I gave you on your site, re-enabled it. Then provide a link to one of your events so we can confirm the code is loading within the page and if so see if we can see why it doesn’t work. Also are you using the WP user integration add-on to autofill the details on page load? |
|
|
Here is the url to a demo event: https://wintersport-tambach.de/register/zweitalsperrenlauf/ Iam shure that my plugin with the code you sent is enabled. |
The Javascript used to copy the primary reigstrants email address to all th other fields is working, but the CSS used to hide them is not. I’ve updated my gist with another selector that should work on your site. Please update the plugin to use the updated code here: https://gist.github.com/Pebblo/44f47386d1221b7916d3ae906f6149c3 |
|
|
Hello, Thank you very much |
Not without custom development.
Yes, it’s possible. You can use some meta data within the events you want to hide the field on and then only output the above code on those events, here is another example showing how you can do that: https://gist.github.com/Pebblo/44f47386d1221b7916d3ae906f6149c3#file-function-php It’s the same code as above with an additional check to see if any of the events in the cart have a ‘hide_email_fields’ custom field set on them, if so it adds the code, otherwise it does not. So you add a custom field for the events you want to do this on like this – http://take.ms/3zwd4 Note that the snippets we provide are intended as a base on which you can continue to develop your own solutions from, we provide support for EE and will often help point you in the right direction with various snippets if we can but the snippets should be considered unsupported and you’ll want to fully test they work how you expect. |
|
|
That works really nice! Thank you
But is it possible to use an other registration page when the custom field is active? So I could write a short note at the top of the page. Therefor I can use a Shortcode before the EE Shortcode:
But I only need this note for some events. For example: I hope you can understand my problem |
You can’t link to a different checkout page, EE can only have a single checkout page regardless of how many pages you add the shortcode to as you need to select the correct page within Event Espresso -> General Settings -> Critical pages. However, there are hooks within the checkout process you can use to add a notice. So you could use the ‘AHEE__SPCO__before_registration_steps’ hook, check if the current step slug is ‘attendee_information’ and then check the events in the cart Example of how to check for the checkout step – https://gist.github.com/Pebblo/f8a69799add1709c4954e43d919585ef Example of how you can pull the events from the session – https://gist.github.com/Pebblo/f4561461339c59411a849f93c91912a9 |
|
|
Hello, now everything works fine 🙂 Have a nice day |
The support post ‘Dont require Email of children’ 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.