Support

Home Forums Event Espresso Premium EE4: A couple of issues on the Registration page

EE4: A couple of issues on the Registration page

Posted: April 30, 2019 at 3:30 pm

Viewing 7 reply threads


mbeede@tracom.com

April 30, 2019 at 3:30 pm

Greetings – I am in the process of testing our event registration page. It is still pretty much your default registration page, except for some CSS look and feel tweaks. Anyway, I noticed that if you fill out all of the required fields on the form BUT leave the consent checkbox UNCHECKED at the end, then hit the submit button here’s what happens:

1. All of the form input is wiped out (removed)
2. “This is a required field” messages are added to all required fields
3. “An error has occurred: :You must consent to these terms…” message is displayed at the top of the page. SO…

1) Removing the existing form input is BAD. Users are not going to want to do this over again. Can this be corrected/fixed so that the user input remains?

2) I need to change error message that displays. I see that error message in this source code: EE_SPCO_Reg_Step_Attendee_Information.class.php line 164, but I don’t see any hooks or IDs to get at it. How can I change this message text to something else without changing your core source code?

Thanks in advance, Mark


Josh

  • Support Staff

April 30, 2019 at 3:45 pm

Hi Mark,

This sounds like another script on the page is altering the default behavior of the form validation. Normally the completed fields do not get wiped out like that if you fail to check the consent box. Can you post a link to the page in question so we can investigate?

with regards to changing text strings, every text string in Event Espresso is wrapped in a translation function. So in most cases you can use the gettext filter to change the wording. Here’s an example snippet that shows an example:

https://eventespresso.com/wiki/how-to-change-wording-with-poedit/#custom-function

so you can adapt the code from above to include
You must consent to these terms in order to register. in the array of strings.


mbeede@tracom.com

April 30, 2019 at 3:48 pm

Hey Josh – Sorry, I meant to include the page information. Do the following:

Go to https://session.tracom.com/sessions/cert-virt-social-style
Select any session, then select the Register Now button
That takes you to the Registration form/page in question

I’ll look at the error message info you gave me too.

Thanks, Mark


mbeede@tracom.com

April 30, 2019 at 3:51 pm

Actually use this instead (the form is a little cleaner):

Go to: https://session.tracom.com/sessions/program-showcase
Select any session, then select the Register Now button
That takes you to the Registration form/page in question

Thanks, Mark


mbeede@tracom.com

April 30, 2019 at 4:05 pm

Josh – So your example for changing the error message text is working great HOWEVER there appears to be a leading “:” character at the front of the error message which is not part of the error message string itself. I need to get that removed. Can you help me out? (note, the input fields being wiped out is a MUCH higher priority issue at the moment…)


Josh

  • Support Staff

April 30, 2019 at 4:48 pm

Has any markup been changed on the registration form page? The reason I ask is because the form is allowed to submit without that checkbox being checked. Normally the form isn’t even submitted if that last input is left unchecked, there’s html5 validation that kicks in.

Short of any modifications to the markup there, the standard troubleshooting steps of ruling out a theme/plugin conflict could apply here.

You could install the Health Check plugin to help troubleshoot this. After the plugin is activated you go to WP → Dashboard → Heath Check → Troubleshooting. There you’ll Enable Troubleshooting Mode, then once that’s activated you’ll reactivate Event Espresso only via the Health Check’s Troubleshooting item in the WordPress Dashboard. At that point, can you check to see if the issue persists?


mbeede@tracom.com

May 1, 2019 at 2:46 pm

Josh – Thank you for the quick reply. The Registration page PHP code has not been touched. Just the CSS and a few new functions in the theme functions.php file to fix a couple display issues.

So I swapped our current theme for a standard WP theme and tried this again. As I think you expected, it behaved completely different. The user input remained, the error message worked a little different, etc. More like what I expected.

So I got in touch with our WordPress dev partner who created the theme and they sent me this feedback:

**********************
There is a javascript error on the checkout page which is probably causing the problem … It can be really tricky debugging these JS dependency errors.

It definitely looks like it is related to EventExpresso scripts, but could be originating from how we are including/enqueuing the jquery file in our theme.

Try contacting EE one more time, and see if they could help guide through this process. Just let them know their scripts are throwing this error ….
**********************

The Javascript error goes away when another theme is applied – I checked that.
So it look like a clash between our theme, and some EE javascript.

What would you suggest at this point? – Mark


Josh

  • Support Staff

May 1, 2019 at 3:27 pm

Does that particular script from the theme need to be loaded on the checkout page? If the answer is no, the simple solution would be conditionally load or enqueue the script only where needed. For example if the that script is needed on the home page only, then only load it on the home page.

If the script is something that needs to be loaded on every page, for example a common JavaScript library, may I ask exactly which script is it? This may be a case where two very similar scripts are being loaded, where only one should be. Like two copies of the jQuery library, each of a different version.

Viewing 7 reply threads

The support post ‘EE4: A couple of issues on the Registration page’ 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