Support

Home Forums Event Espresso Premium Problem with checkout registration

Problem with checkout registration

Posted: February 8, 2018 at 5:38 pm

Viewing 10 reply threads


TOCIFT

February 8, 2018 at 5:38 pm

On proceeding to Registration and beginning to enter information, the registration is copying the first and last name of the sponsor into the first and last name of the first attendee. See screenshot: https://gyazo.com/8b3bd1af64bc26a2c94443fc5e54c21e
The Sponsor is not an attendee in most cases, so this will not work. How can I make this behavior stop?

Thanks, Laura


TOCIFT

February 8, 2018 at 5:44 pm

Just realized that I believe it is the autofill that is doing this action. Is there any way to disable autofill?


Josh

  • Support Staff

February 9, 2018 at 7:44 am

Hi there,

I’ve not seen it where the Browser’s autofill will populate more than one form on a page, are you sure it’s not the checkbox option next to “Use Sponsor #1’s Information for ALL Sponsor Information”? That option can be removed by uploading a blank file to your WordPress theme’s directory. The name of the blank file must be
copy_attendee_info.template.php.


TOCIFT

February 9, 2018 at 9:17 am

It’s the autofill. I threw a pic up in the media bin: http://184.154.244.76/~tocift07/wp-content/uploads/2018/02/IMG_0514.jpg


TOCIFT

February 9, 2018 at 9:21 am

It is just the first form, but it’s not a good thing. They will have to change the name if they use the autofill.


Josh

  • Support Staff

February 9, 2018 at 9:44 am

The reliable way to disable autofill is disable it within the browser’s settings panel. Which you can’t do that for each of their computers obviously.

You can also try setting an autocomplete=off attribute on each of the form field inputs, which most browsers should respect, but apparently some browsers will ignore it.

This code will add the attribute:

add_action('wp_enqueue_scripts', 'my_autocomplete_off_for_ee_forms', 20);
function my_autocomplete_off_for_ee_forms(){
    $custom_js = 'jQuery(document).ready(function($){';
    $custom_js .= '$( "input.ee-reg-qstn" ).attr( "autocomplete", "off" );';
    $custom_js .= '});';
    wp_add_inline_script('ee_form_section_validation', $custom_js);
}

You can add the above to a functions plugin.


TOCIFT

February 14, 2018 at 7:55 am

I added the code and it didn’t work with my Chrome browser. That is a highly used browser. Can you check the code and see if I did anything wrong?

Here is all the code in my functions.php in my child theme folder:

<?php
function mycustom_filter_gettext( $translated, $original, $domain ) {

// This is an array of original strings
// and what they should be replaced with
$strings = array(
‘Attendee Information’ => ‘Participant and Sponsorship Information’,
‘Attendee %d’ => ‘Registration %d’,
‘Use Attendee #1\’s information for ALL attendees’ => ‘Use Sponsor #1\’s Information for ALL Sponsor Information’,
// Add some more strings here
);

// See if the current string is in the $strings array
// If so, replace its translation
if ( isset( $strings[$original] ) ) {
// This accomplishes the same thing as __()
// but without running it through the filter again
$translations = get_translations_for_domain( $domain );
$translated = $translations->translate( $strings[$original] );
}

return $translated;
}

add_filter( ‘gettext’, ‘mycustom_filter_gettext’, 10, 3 );

//Filter the ‘Return to Event List’ text.
function ee_change_events_list_btn_txt() {
return ‘Add Another Item to Cart’;
}
add_filter( ‘FHEE__EED_Multi_Event_Registration__return_to_events_list_btn_txt’, ‘ee_change_events_list_btn_txt’);

add_filter(
‘FHEE__registration_page_attendee_information__copy_attendee_pg’,
‘my_attendee_copy_message’
);
function my_attendee_copy_message($message) {
$message = ‘This option allows you to use the above information for all additional sponsor question fields. ‘;
$message .= ‘<strong style=”color:red;”>’;
$message .= ‘ALL ATTENDEE FIELDS MUST BE FILLED IN WITH DIFFERENT ATTENDEE NAMES, BUT CAN BE EDITED LATER.’;
$message .= ‘‘;
return $message;
}

add_action(‘wp_enqueue_scripts’, ‘my_autocomplete_off_for_ee_forms’, 20);
function my_autocomplete_off_for_ee_forms(){
$custom_js = ‘jQuery(document).ready(function($){‘;
$custom_js .= ‘$( “input.ee-reg-qstn” ).attr( “autocomplete”, “off” );’;
$custom_js .= ‘});’;
wp_add_inline_script(‘ee_form_section_validation’, $custom_js);
}

Thanks! Laura


Josh

  • Support Staff

February 14, 2018 at 5:56 pm

Hi Laura,

I’m afraid I cannot verify the code because of the way the forums reformat it. The code itself may be okay, and the problem may actually be it’s loading too late. This is because theme code executes after plugin code has already finished, so whatever you try to change can’t change because it’s done already. Can you remove the code from the functions.php file and add it to a functions plugin?

If loading the code from a functions plugin still doesn’t work, can you post the code to a pastebin or GitHub Gist, then link here so we can review?


TOCIFT

February 28, 2018 at 8:01 pm

I created the functions plugin – screenshot – and copy and pasted your code
https://pastebin.com/uCCXSQaP

It is still not working in Chrome. Can you see if I’ve done anything wrong. Thanks!


Tony

  • Support Staff

March 1, 2018 at 9:33 am

The above code is being output to the page – http://take.ms/20FoX

And the inputs all have the attribute set – http://take.ms/GMZEw

Unfortunately if Chrome chooses to ignore that attribute and allow autocomplete anyway there isn’t much we can do to prevent it.


TOCIFT

March 6, 2018 at 7:44 pm

Ok. Thank you for trying.

Viewing 10 reply threads

The support post ‘Problem with checkout 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.

Event Espresso