Support

Home Forums Event Espresso Premium Registration Form Questions are not Pre-populated

Registration Form Questions are not Pre-populated

Posted: November 15, 2021 at 6:23 pm


pathwise

November 15, 2021 at 6:23 pm

Hello,

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?

Regards,
Nila Kundu


Tony

  • Support Staff

November 16, 2021 at 3:13 am

Hi Nila,

Do you have the WP User integration add-on activated on the site?

https://eventespresso.com/product/eea-wp-user-integration/

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?


pathwise

November 16, 2021 at 2:33 pm

Hello Tony,

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?

Regards,
Nila Kundu


Tony

  • Support Staff

November 17, 2021 at 5:07 am

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:

https://github.com/eventespresso/ee-code-snippet-library/blob/master/addons/eea-wp-user/mn_wp_user_addon_save_custom_answers_too.php

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:

https://github.com/eventespresso/event-espresso-core/tree/master/docs/G–Model-System

The support post ‘Registration Form Questions are not Pre-populated’ 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.

Event Espresso