Posted: November 15, 2021 at 6:23 pm
On our website only existing users have the ability to register for events set up using Event Espresso. My expectation was the questions like first name, last name, email address etc are going to be pre-populated when a logged in user registers for an event, but this is not happening. Moreover, I did not find a way to pre-populate these fields using shortcodes either. Could you please tell if I am missing something here?
Do you have the WP User integration add-on activated on the site?
That add-on will auto-fill the First Name, Last Name and Email address, but not others.
Which fields are you looking to auto-fill and where would the value be pulled from?
Thank you for your response!
The first name, last name and email address fields are now getting pre-populated after activating the WP User Integration plugin.
We collect some user specific information like their agency name, their position title etc. when they become a member on our site. We save these information as shortcodes and are being used throughout the site. Our goal was to pre-populate these custom fields as well when someone registers for an event. Is there any way to do that?
You save them as shortcodes?
The shortcodes will be used to pull the value in and display it, but where are the values saved?
You can’t set EE to use shortcodes within the question, but it is possible to pre-fill additional custom questions on the registration form with some PHP.
How comfortable are you with PHP?
We have a snippet that pulls in the users last answer and pre-fills that available here:
Meaning after the user registers they would need to add the details again on the first registration and then after that EE will pull in that answer the next time they register.
Failing that you can use the same hook in that snippet to pull the value from the current_user and return that for the specific questions you need.
However, the above will require learning a little about our model system to work with it i you want to use custom values: