Support

Home Forums Event Espresso Premium List of string names from System Questions?

List of string names from System Questions?

Posted: January 15, 2016 at 12:51 pm


BCPTA

January 15, 2016 at 12:51 pm

Hi there,
I’m looking to find a list of the strings used for the system questions in the registration form.

For example I’m looking at these questions in the registration form settings: https://cloudup.com/cFrDl8dDfze

And we are trying to find the naming system that is similar to the WordPress field strings here: https://codex.wordpress.org/Template_Tags/the_author_meta#Advanced_Uses

We are particularly trying to get our membership sign up form, and the user profile, to use the same fields that EE4 would use when registering an event.

So for example, if someone signs up to be a member on our site, they would have to enter their “City” in a form field.

We want that “City” field to be connected to their profile when registering for an event, the same way “first_name” and “last_name” would be integrated when using the WP Users add-on.

We can create these form fields using Paid Memberships Pro, but we want to make sure that when we do so, they will eventually connect to what Event Espresso is doing.

So there won’t be two “City” fields in a user’s profile that they have to fill out, if you know what I mean.

I hope you understand what we’re trying to do here. If we’re on the wrong path please let us know.

If you can just direct us to a way we can find these EE4 string names, and not just their labels, that would be great.

thank you

P.S. I tried several searches in forums and documentation but couldn’t find this precisely. I did try though!


Lorenzo Orlando Caum

  • Support Staff

January 15, 2016 at 2:00 pm

Hello, I’m not sure that I understand what you are looking for but if you click through on one of those system questions, then you’ll see the text for each question.

Those will be the same for each new install of Event Espresso 4.

Here is what I see in the database for a testing site:

fname
lname
email
address
address2
city
state
country
zip
phone

http://cl.ly/323t143I2k36


Lorenzo


BCPTA

January 25, 2016 at 1:40 pm

Hi Lorenzo, in trying to coordinate this with PM Pro, I got this reply from them, and I think they are right, can you please help us find the correct user meta?

> This shows what that plugin uses in its database: http://cl.ly/323t143I2k36
That screenshot looks like database entries for the meta data for the fields used by Event Espresso, and doesn’t really provide info whether they are saved to user meta.


Josh

  • Support Staff

January 25, 2016 at 4:48 pm

Hi Johanna,

They can find what they’re looking for if they look in the _esp_attendee_meta table.


BCPTA

January 25, 2016 at 5:24 pm

Hi Josh, is this not what Lorenzo sent a screenshot for? So far it is not integrating with the field meta of “city” when I try it out. Setting up that field to become a WP user (member with PMPro) doesn’t affect it or pre-populate the registration checkout field for “city” in EE4.

It creates a new “city” field but I don’t know where the EE4 field is.

Does that make sense? Maybe I’m missing something.

When I look at the input “name” for “City” I see this: ee_reg_qstn[2][city]

Is that what it could be? Though this is creating errors that never allow a user to checkout (for membership) when I try to use that.


Josh

  • Support Staff

January 26, 2016 at 8:18 am

Hi Josh, is this not what Lorenzo sent a screenshot for?

No it is not. Lorenzo’s screenshot was a picture of the _esp_questions table. That’s a completely different table that stores the questions, not the answers. The _esp_attendee_meta is the database table that stores the answers to system questions for each contact.

So far it is not integrating with the field meta of “city” when I try it out. Setting up that field to become a WP user (member with PMPro) doesn’t affect it or pre-populate the registration checkout field for “city” in EE4.
It creates a new “city” field but I don’t know where the EE4 field is.
Does that make sense? Maybe I’m missing something. When I look at the input “name” for “City” I see this: ee_reg_qstn[2][city]
Is that what it could be?

I don’t think so. You’re looking at the question, but from the sounds of things, you actually want to sync the answers to those questions, right?

Though this is creating errors that never allow a user to checkout (for membership) when I try to use that.

What’s creating errors? If this is pertaining to an integration issue, I can advise to discuss this with the developer of the integration.


BCPTA

January 26, 2016 at 3:47 pm

Hello Josh, thank you for answering. I just want to get some clarification here so that we can make an integration and coordinate the info we need to pass on.

So based on your answer above, the user meta keys would be the following?

https://cloudup.com/cIqacxveQ5M

That means that if I want a WP user to register on the site, and enter their “City” for instance, the meta key would be “ATT_city” if I want that to match up to the EE4 “City” field. Is this correct?

Another scenario of the usage of “ATT_city” would be if I were importing a CSV of users, and I want on the WP User profile page to have “City” – I could use a column header in the CSV of “ATT_city” the way I would also use “first_name” and “last_name” as column headers, which match native WP user meta.

Am I getting somewhere with this understanding?

If that is correct, my follow up question would be how the WP Users Integration matches up “first name”, “Last name” and other fields with the registration data in EE4? So that in the user profile, this info matches up?

Because its seeming like the EE4 meta data is a completely separate table from WP user meta, so it would be hard to ‘connect’ it to the WP user profile if I added those fields on a “sign up to use this site” form (in our case using Paid Memberships Pro).

Are these assumptions correct?

Thank you again for your help.

If it helps to just give more context, and get this info out there so there’s less back and forth here, this is an excerpt of how PM Pro explained it to me, which I’m trying to confirm is ‘true’ because they also don’t know how your system works. We are just trying to find out the scenario we are dealing with, and then from there we’ll make a decision about how to move forward.

The pmpro_baddress1, etc fields are the required PMPro billing fields. Those _have_ to contain data when the transaction is submitted to be sent to the payment gateway or else we can’t submit it to the payment gateway.

That means, if you’re trying to fill in the billing fields based on possible EE4 data, you’ll need to read the correct EE4 usermeta, and add it to the corresponding PMPro pmpro_b* fields on the checkout page (I would recommend doing that by using a customized checkout.php page and then look up the user, read their EE4 usermeta and insert it as the field values for the corresponding PMPro fields on that page).

If EE4 saves their metadata info in the usermeta table, it’s possible (likely) that they have some sort of prefix in front of the field names they list in the table you linked the image for.

You would then “simply” match the RH [Register Helper] field names with the actual EE4 usermeta field names.

If EE saves their usermeta in completely separate tables, you would need to use their API to grab the correct data (again, I’d do this in a custom checkout.php page) and insert it where it belongs (in the corresponding pmpro_b* fields (for example; The EE4 city field is the equivalent to pmpro_bcity).


Josh

  • Support Staff

January 26, 2016 at 4:35 pm

No it turns out Event Espresso does not save the answers from System questions into the _user_meta table as meta key/value pairs. Instead, are saved in individual rows in the _esp_attendee_meta table. This means the last sentence in their info applies, except it’s not required to use EE’s API to get that attendee data. One could also query the WordPress database directly to get the attendee data.


BCPTA

January 26, 2016 at 4:58 pm

Thank you Josh.

About the form fields though, am I correct that it’s the column headers in the attendee meta that would be used as meta keys, if we wanted to use them one way or another on other parts of the site?


Josh

  • Support Staff

January 26, 2016 at 5:35 pm

It is correct that this is the table where you get the attendee data from, and the _esp_attendee_meta column names are similar to meta keys in that they identify the data to retrieve. When building the integration though, it’s important to know that they are not used as meta keys. The data from the _esp_attendee_meta would generally be grabbed by querying the database. The one meta_value from the _usermeta table that you’ll use to help retrieve the data is the wp_EE_Attendee_ID meta_key.

The support post ‘List of string names from System Questions?’ 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