Posted: July 15, 2017 at 9:48 am
|
Hello. I have EE4 with the WP User Integration Add-on and the Members plugin by Justin Tadlock. Can someone help me implement the following: – Bulk pre-load users and some user info (e.g. date of birth) that I do not want users to self-input. Thank you!! |
Hi there, I’ll follow up with each of your questions below:
You can use this plugin to bulk import users with user info:
You set the “Login Required on Registration” option to Yes in the WP Users Integration plugin:
There are a few places where this can be edited, so there are a few parts to this. This part disallows the user from editing on their profile page: Then you’ll also need to set “Always sync contact information with WP user profile?” to No in the Event Espresso > Registration Form > Reg form settings page.
You can collect additional registration/attendee info on the registration form by following these guides: Please note that the registration form answers do not get written to the WP User meta table. These answers are attached to the registration. If you want the answers to be pre-populated on their following registrations, then there’s some code you can add to a functions plugin:
You can actually use the Members plugin with some shortcodes to do this. The Members plugin has an 1) Create some new custom capabilities with the Members plugin e.g.
and so on. Hope that helps! |
|
|
Hi, Josh! This was so amazingly helpful. Thanks so much for your comprehensive and informative reply. Some follow-up questions: Thanks so much!! |
Do you have the WP User Integration add-on activated? If so there should be a WP User Integration tab on the Event Espresso > Registration forms admin page where you’ll find that option.
This would require some significant PHP development.
Event Espresso does not have settings for hiding/displaying events to certain users. |
|
|
Hi Josh. Thanks so much for clarifying that. I have two more related questions that I sort of mentioned in my first post, but I realize I may not have explained well enough. When people are using the EE registration form: To explain the background behind these requests, I am trying to prevent sneaky registrants from falsifying some of their information that I already have access to/know for a fact and am pre-populating via the plugins you linked me to (which are working out great). Thank you!! |
|
Hi again. |
Hi there, Prepopulating a registration form question with data from the wp user meta table would actually require some significant PHP development. I’m not sure why you’d include a field on the registration form where you don’t want the data changed anyway. With regards to the capability, you’ll actually be creating the capability with the members plugin, then using the members plugin to restrict content. So the capability could be anything unique that you make up and as long as the capability you make is the same as what you use in the shortcode it will do the job. Another example: 1) Create new custom capabilities with the Members plugin e.g.
and so on. |
|
|
Hi Josh. Thanks for the help! I should explain my more specific reasoning behind all this registration form customization because maybe I’m unaware of settings or code that could help. When an event organizer views or downloads a CSV of all the registrants for their event, in that CSV, I want to capture all my WP user meta data (that I pre-loaded with the plugin you suggested – thanks!) and all the registration form data that the registrant filled out. So I was thinking that if I can pull the WP user data into the form and make it uneditable, it would be a “workaround” of sorts of pulling the data into the CSV that is exported, since it contains reg form data but not WP user data. HOWEVER, I have today learned from Lorenzo that reg form data is only put into the registration for the first event someone registers for in a multi-event order. This is a problem because I need each event to include the reg form data. The only way around this is to check the question groups for additional registrants and then it will consider each event a new registrant and require the person to fill out the form for each new event (not fun when I have people selecting 10 events in one order). So I should start with the basic question and see if you have any suggestions (please!): How could I include pre-loaded WP user data AND any additionally collected reg form data in the CSVs that are exported for ALL the events anyone registers for? Any and all creative solutions are welcome! I’m working with a developer who has been handling any custom CSS, PHP, JS code but does need templates or examples to work from when things are more complex. Also, for the capabilities, that works but only in pages. I am hoping to restrict certain event organizers from seeing content in the EE wp-admin pages (e.g. https://mcgilloweek.ca/wp-admin/admin.php?page=espresso_registrations) Thank you thank you thank you!! |
First, I’m not sure that Lorenzo’s information was correct because if you include registration form questions for additional attendees, each registration for each event will include form fields and data. That said, I don’t think it’s necessary to include the user meta into the registration just to get that information onto the CSV report. The CSV report has the capability to allow custom additional columns. If your developer has a reasonable understanding of the WordPress plugin API, then they can use this hook to add more columns to the registrations CSV report:
Here’s a link to the source code where that filter resides in EE4 core so they can review the context:
You can restrict certain event organizers from seeing content in the EE wp-admin pages by using the Members plugin to edit their user account/role and remove some or all of the following capabilities:
There’s more information in the documentation about the capabilities system: https://eventespresso.com/wiki/event-espresso-4-roles-permissions/ |
|
|
Hi Josh. Thanks so much for the response and info. I’ve now learned that this is why it’s helpful to explain my reasoning/needs rather than just ask for how to do something. 🙂 Lorenzo was right with what he told me, but maybe you misunderstood what I wrote or I wasn’t clear in what I wrote. There won’t ever be “additional guests” for my event sales. What I ideally need is that 1 guest can register for multiple events, fill out 1 registration form, and then the info from the form will be loaded into the CSV for all events that the 1 person registered for. That’s what doesn’t seem to be happening. Either, only one event in the order gets the reg form into a CSV or I have to enable “Additional Registrants” and it asks the 1 guest to complete a form per event and thinks that they are multiple people. However, your hook suggestion might be an even better solution, so I’ll work with that for now. Ideally then, I would ask my registrants to fill out a form somewhere on my site (not an EE form) and pull all the info from it to new columns in the CSVs. I’d also want to pull in WP user meta data into the CSV. You think that’s all possible? Any suggestions are appreciated! And the capabilities documentation is helpful but there is a specific capability that I can’t seem to find (and may not exist therefore). If I have an EE event category called Fun Times and the category slug is “fun”, what would the capability be so that a user can only see events of that CATEGORY only, whether it’s their event or another user’s event. ee_read_events allows them to read only their events. ee_read_others_events allows them to read ALL others’ events. How do I allow them to read ALL events of the category “fun” no matter who authored them? I’ve tried ee_read_event_category_fun and ee_read_events_category_fun and ee_read_fun … nothing has worked. Thanks as always!! |
The capability to view a category doesn’t exist because you’ll need to make it. Earlier in this thread I gave you some very specific step-by-step instructions about how to set up a page to view different lists of events by categories (with access restrictions). Here they are again: 1) Create new custom capabilities with the Members plugin e.g.
and so on. |
|
|
Right, I saw that and the issue that I mentioned in the follow-up is that I’m not using these capabilities to show events in front-end pages. I need the capability to apply to wp-admin areas (https://mcgilloweek.ca/wp-admin/admin.php?page=espresso_registrations) where I can’t wrap custom [access capability] shortcodes, to the best of my knowledge. Unless that’s possible in some way? The default ee_read_events and ee_read_others_events DO apply to the wp-admin areas so I thought that there might be “built-in” ee capabilities that involve reading event categories as well. |
The built in capabilities do not include restricting access to events based on categories. |
|
|
OK. Noted! Thanks for all your extensive help on this thread. Will mark as resolved 🙂 |
The support post ‘Pre-upload users and show custom registration’ 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.