Posted: February 26, 2013 at 9:36 am
|
We used Espresso for a client’s yearly event last summer and they came back and want to use it again this year, so first off, thanks! One request was that the current user base (200+) all filled out their name and address info for last year but it is not pre-populating for this year’s form. I’ve noticed if you fill it out in your profile it works great to pre-fill for an event, but I’d love for the reverse to happen and have it update your profile with your name and address from the event. So two questions/requests: 1) To prefill everyone from last year, is it best just to write a one-time query in the DB and populate profile info from the Espresso tables? It looks like I’d just add meta_keys for things like event_espresso_address to wp_usermeta and use wp_events_attendee as my lookup table. Is that the correct/best way? 2) Is there any way to automate this so new registrations can have their profile fields updated when they register for an event? I know it knows what is related since it pre-fills but wasn’t sure if this was an option I was missing. I am familiar with up to 3.1.21 but haven’t worked with EE too much since that release. Thanks, |
Probably.
That sounds right. You’d be pulling from the attendee information to the user profile information.
Automate? No. We’d like to do that, too. Although you could set all your events to be member-only events and force people to register and then fill in their information before they are able to register. It adds a step on their end but it would autofill the address if they added that to their profile. A new ESPRESSO_EDIT_PROFILE shortcode has been added to the WP User Integration add-on so you can have a front-end edit profile page where they can add their address info. |
|
|
The pre-fill only works when the user is logged into the site. Are you having your users log into the site before they go to register for the event? As far as I know, the information flow is only designed to work in one direction, from the profile to the event fields. So to move last year’s registration info into the user profile, you would have to use a custom php script to move it directly in the database. So the answer to your first question is yes. I think the only way to accomplish what you want in your second question is with another custom php script. Perhaps you could trigger it from the payment page template. That way you only have to modify one EE template file, and since the attendee id is available in that template file, you can send along that info when you call your custom function, to minimize the db hit. |
|
Thanks all. Chris: I may look into ESPRESSO_EDIT_PROFILE but I’ve also found that Espresso works well with Theme My Login too for anyone interested. Sidney: We are requiring them to create an account or login first, so I think that would work well to update their profile after they have paid. We’re already going to modify that step to change their WP Role so that’s a great idea. |
Nothing stopping you from using both. Theme My Login handles the login part. The edit profile link keeps them on the front end when they try to edit their profile information. |
|
The support post ‘Save Address from Event to Profile’ 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.