• Resolved ntel

    (@ntel)


    Hi!

    I’d like to change two things to my forms and was unable to find where this happens or how this works.

    1. The text for invalid address eg. “test@test.com looks fake or invalid, please enter a real email address.” – how does this get changed?
    2. The submission animation (circle + rectangles) is a tiny bit strange – I’d like to get back to something more standard – is this possible?

    Thank you!
    Ntel

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Contributor yikesitskevin

    (@yikesitskevin)

    Welcome back Ntel! Hope you’re well.

    1. To customize the message, use this filter function:

    add_filter( 'yikes-mailchimp-general-error-response', 'yikes_mailchimp_customize_email_is_invalid_message', 10, 3 );
    
    function yikes_mailchimp_customize_email_is_invalid_message( $original_response_text, $user_defined_response_text, $form_id ) {
    
    	if ( strpos( $original_response_text, 'looks fake or invalid' ) !== false ) {
    		return 'This is the custom message to return when an email looks fake or invalid.';
    	}
    
    	return $original_response_text;
    }

    2. You can use your own animations, remove our animations, and/or change the styles.

    2.1. Remove our animations:

    // Remove loading dots gif (submit button gif)
    add_filter( 'yikes-mailchimp-loading-dots', '__return_false' );
    
    // Remove spinning gif (form gif)
    add_filter( 'yikes-mailchimp-preloader', '__return_false' );

    2.2. Use your own animations:

    // Remove loading dots gif (submit button gif)
    add_filter( 'yikes-mailchimp-loading-dots', 'yikes_mc_change_submit_button_animation' );
    
    function yikes_mc_change_submit_button_animation() {
    	return 'url-to-gif';
    }
    
    // Remove spinning gif (form gif)
    add_filter( 'yikes-mailchimp-preloader', 'yikes_mc_change_spinning_form_animation' );
    
    function yikes_mc_change_spinning_form_animation() {
    	return 'url-to-gif';
    }

    2.3. Let me know if you’d like to change the styles. The main selectors are:

    .yikes-mailchimp-preloader{
        /* The form gif */
    }
    
    .yikes-mc-loading-dots {
        /* Submit button gif */
    }

    Cheers,
    Kevin.

    Thread Starter ntel

    (@ntel)

    What an excellent, thorough answer. Thank you Kevin!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Change default messages, and animation of validation’ is closed to new replies.