Support

Home Forums Event Espresso Premium ETA on saving additional form fields with WP User Integration plugin

ETA on saving additional form fields with WP User Integration plugin

Posted: October 18, 2018 at 4:20 am

Viewing 1 reply thread


rossib94

October 18, 2018 at 4:20 am

I recently installed the WP User Integration add on. It works well at what it does, but I was disappointed to find it only saves the first name, last name and email field. Upon reading the documentation I can see the following line: “At this time, the first name, last name, and email address are pre-populated. An enhancement is coming to a future version that will pre-populate additional fields (e.g., address fields).”

‘Coming to a future version’ is vague, can you give a more concrete idea of how long until it can save more fields? A client has asked for exactly what this plugin claims to do, but I need it to save and pre-populate more fields than it does.

Conversely, if it is not any time soon, can you give me some pointers as to where in the plugin data is saved and loaded? I am loathe to edit a plugin but I am a developer and the client needs this functionality so with some pointers I can at least have a crack at doing it myself.


Tony

  • Support Staff

October 18, 2018 at 4:42 am

Hi there,

You wouldn’t actually need to edit the plugin itself, EE (and its add-ons) is packed full of hooks for you do to pretty much anything you want to.

For what you are asking for it depends on the exact fields you want, and where you want them to load from but we have snippets that cover some scenarios.

For example, this snippet:

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

Will pre-populate the system address fields after the user has provided them on the registration form for the first time.

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

Will pull in any answer to any custom questions that have been previously populated on the registration form.

You can either/both of those snippets to a custom functions plugin on the site:

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

One of the reasons (but not the only one) this wasn’t included in the add-on by default is due to the expectation that it could then just pull in that data from anywhere. For example if you want to pull the values for say address 1 from a different location than the EE_Contact info it gets a little more tricky.

Let’s say you have a membership plugin and used something like Ultimate member to set up a member profile, it has all of the address fields already set up so you want to pull them from there. You can use the exact same hooks in those snippets but as you’ll know how you pull the data in is then completely different, now another user uses s2 member and wants to do the same (and so on for the X amount of membership plugins that all store the data under different keys).

First Name, Last Name and Email are the only constant values from a wp member profile we can use although its likely that eventually something similar to the first snippet I added will be included in the add-on to pull the address info from the EE_Contact only.

Viewing 1 reply thread

The support post ‘ETA on saving additional form fields with WP User Integration plugin’ 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