Hello I am curious if it is possible to use a template over ride to determine which question group to display to the user. I have two different types of registered users and want to show a different question group based on the users role.
I looked at registration_page.php but not seeing anything related to the question_group.
Can someone point me in the right direction or maybe an action or filter etc?
There are no hooks, but you could edit the registration_page.php template and modify the $question_groups array.
This array has the ID’s of the question groups to be displayed, so you could run a simple if-else statement and unset the elements you don’t want.
If you are editing this template, please copy registration_page.php AND registration_page_display.php over to wp-content/uploads/templates/ and edit them there, this will stop plugin updates from over writing your modifications.
Ok I figured it out. This is what I used I did an if statement to check current users role. Then $question_groups = ‘a:1:{i:1;s:1:”3″;}’; The 3 in this is the id of the question group.
Just wanted to update this in case anyone else searches for the same thing. If you want multiple forms the best way to do that is go and edit an event, check each question group you want for that event. Then go and look in the event_details db table column question_groups from there you will see how this is formatted etc.
Thanks again for pointing me in the right direction.
The support post ‘Template Over Ride to Dynamically Choose which Question Group to display?’ 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.
If you would like help from the Event Espresso staff, then please purchase a support license right now so you can create a support topic in our premium support forums.