Support » Plugin: Contact Form 7 » Don't slideDown fields when using use-floating-validation-tip

  • Hello,

    Thanks for restoring the functionality of the floating validation tip. I have so many websites that use this that it’s easiest to continue with that until I get around to redesigning for the more accessible messages.

    However, the CF7 JavaScript still slides-down the field unnecessarily when showing the floating tip. This makes the form “bounce” in a distracting and undesirable way. This can be fixed by changing the $.fn.wpcf7NotValidTip function…

    …from this:

    $.fn.wpcf7NotValidTip = function(message) {
    		return this.each(function() {
    			var $into = $(this);
    			$into.hide().append('<span role="alert" class="wpcf7-not-valid-tip">' + message + '</span>').slideDown('fast');
    
    			if ($into.is('.use-floating-validation-tip *')) {
    				$('.wpcf7-not-valid-tip', $into).mouseover(function() {
    					$(this).wpcf7FadeOut();
    				});
    
    				$(':input', $into).focus(function() {
    					$('.wpcf7-not-valid-tip', $into).not(':hidden').wpcf7FadeOut();
    				});
    			}
    		});
    	};

    … to this:

    $.fn.wpcf7NotValidTip = function(message) {
    		return this.each(function() {
    			var $into = $(this);
    			$into.hide().append('<span role="alert" class="wpcf7-not-valid-tip">' + message + '</span>');
    
    			if ($into.is('.use-floating-validation-tip *')) {
    				$('.wpcf7-not-valid-tip', $into).mouseover(function() {
    					$(this).wpcf7FadeOut();
    				});
    
    				$(':input', $into).focus(function() {
    					$('.wpcf7-not-valid-tip', $into).not(':hidden').wpcf7FadeOut();
    				});
    				$into.show();
    			} else {
    				$into.slideDown('fast');
    			}
    		});
    	};

    This makes the slideDown only happen if the floating validation messages are not used. Much nicer. Please could the plugin author consider including this change in a future version?

    Thank you
    Joel.

    https://wordpress.org/plugins/contact-form-7/

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Don't slideDown fields when using use-floating-validation-tip’ is closed to new replies.