Support

Home Forums WP User Integration Sync Event Registration Form With Custom User Fields

Sync Event Registration Form With Custom User Fields

Posted: November 26, 2019 at 6:40 pm


SpliceMarketing

November 26, 2019 at 6:40 pm

We have purchased the WP User Integration plugin and would like sync a custom field in the event registration forms with Users in the WordPress database. So that when a logged in user registers for an event the custom fields are pre-populated with the information in the database that they have already provided.

Would the addition of a membership plugin like MemberPress or Paid Memberships Pro be able to achieve this? Or is there another way.
Thanks.


SpliceMarketing

November 26, 2019 at 11:18 pm

Or would it be possible to hide a custom form field in the registration form if the user is logged in?


Tony

  • Support Staff

November 27, 2019 at 3:32 am

Hi there,

Whilst it is possible to save values to the WP user account and pull them into the registration form, we don’t currently have a snippet to it so you’d need something custom.

We do have snippets to autofill a users ‘last’ used answer on the registration form, meaning on the first registration the user adds they provide all details requested. Then on the next registration, if your events use the same questions those values will be pulled in and used on that registration (the user can edit them before moving on to payment optons if they prefer), would that work for you?

To do that you use this snippet:

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

You can add that to a custom functions plugin on your site, we have some documentation on creating one here:

https://eventespresso.com/wiki/create-site-specific-plugin-wordpress-site/

Adding a membership plugin will not ‘sync’ the custom fields with the registration form, you would still need custom code to pull/save the data.

Or would it be possible to hide a custom form field in the registration form if the user is logged in?

I’m not really sure I follow how this would help, can you add more details on this please?


SpliceMarketing

November 27, 2019 at 4:39 am

Thanks for that information. I will try and implement the snippet provided.

In regards to the second question, we would like to display a required field in the registration form for those who are registering for the 1st time. The membership site is for medical professionals, so we would like to check their license number before giving them access to the site and events. Users already registered would have already been checked and do not need to provide this information again.

Hope this provides more information. Let me know what you think. Thanks you for your assistance.


Tony

  • Support Staff

December 10, 2019 at 4:51 am

Hi there,

My apologies for the delay in getting back to you over this.

I have a couple of questions for this as I’m not sure I understand how this is working.

Are users required to set up an account on your site to register onto these events?

Are you using EE to automatically register user accounts using the reg form details?

The reason I’m asking is the ‘license number’ essentially has very little to do with the registrations, understand the license number is required for your events but capturing that field sounds like it should be done outside of Event Espresso in this case.

To explain, it sounds like you need users to register onto the event before they can proceed with registrations, so if that is the case, would it not work better to validate this value on the user accounts rather trying to do it from within EE?

As in the user registers an account on the site, that account is validated and then the user can register onto events. It sounds like no valid license means they can’t attendee and if that is the case there is no need for them to have a user account in the first place.

Make sense?

Having said that, hiding a field on the registration form based on log in status would be possible to do but would require custom code as we don’t have anything within core to do it at this time.

The support post ‘Sync Event Registration Form With Custom User Fields’ 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