• Resolved dvwb

    (@dvwb)


    Hello,

    I installed multiple forms on my wordpress site but on neither one of those forms (contact forms) the space bar is working.
    So people can’t type a normal message in the forms.

    How can i fix this?

    Thanks in advance.

Viewing 14 replies - 1 through 14 (of 14 total)
  • You will need to provide more information like if you are using a plugin and maybe some links to the pages you are referring to.

    Thread Starter dvwb

    (@dvwb)

    I’m using Contact form 7.
    this is the page the form is on: https://tinyurl.com/y9ya2ws

    Thanks.

    Must be some kind of conflict with that image rotator thingy

    When the page was first loading, that image rotator wasn’t there. I was able to use the spacebar just fine. But once the page finished loading, I could no longer use the spacebar.

    I’m not sure how to fix that, but maybe this helped stear you in the right direction. As last resort, another contact form plugin maybe?

    My fave is:
    https://www.deliciousdays.com/cforms-plugin/

    It’s this script causing the problem.
    wp-content/themes/theme1008/js/jquery.opacityrollover.js

    In blocking that script, spaces work again.

    cforms is =much= more powerful than Contact form 7. You should have a look at it, it’s a great plugin.

    Thread Starter dvwb

    (@dvwb)

    Thanks for your replies. I’ll have a look at it. the cforms contact form as well.
    I’ll post the results.

    Thread Starter dvwb

    (@dvwb)

    Disabling that script did do the trick. But when I disable that. my entire gallery won’t work properly.
    This is the code of the script:

    /**
     * jQuery Opacity Rollover plugin
     *
     * Copyright (c) 2009 Trent Foley (https://trentacular.com)
     * Licensed under the MIT License:
     *   https://www.opensource.org/licenses/mit-license.php
     */
    ;(function($) {
    	var defaults = {
    		mouseOutOpacity:   0.67,
    		mouseOverOpacity:  1.0,
    		fadeSpeed:         'fast',
    		exemptionSelector: '.selected'
    	};
    
    	$.fn.opacityrollover = function(settings) {
    		// Initialize the effect
    		$.extend(this, defaults, settings);
    
    		var config = this;
    
    		function fadeTo(element, opacity) {
    			var $target = $(element);
    
    			if (config.exemptionSelector)
    				$target = $target.not(config.exemptionSelector);	
    
    			$target.fadeTo(config.fadeSpeed, opacity);
    		}
    
    		this.css('opacity', this.mouseOutOpacity)
    			.hover(
    				function () {
    					fadeTo(this, config.mouseOverOpacity);
    				},
    				function () {
    					fadeTo(this, config.mouseOutOpacity);
    				});
    
    		return this;
    	};
    })(jQuery);

    Does anyone know what’s wrong here?

    I also prefer cForms over Contact Form 7.

    However @t31os_ reports that the problem is being caused by a JavaScript in your theme. You can test this by switching to the Default theme and seeing if that makes the problem go away.

    Thread Starter dvwb

    (@dvwb)

    I tested it already. It did do the trick like I said in my previous post. But when I disable that script my gallery won’t work properly. So maybe anyone knows what’s wrong with the code?

    Thanks.

    It could be that you’re including jQuery twice … drop the include for jQuery from your custom script (you can leave the others in, just lose the jQuery-min-1.3.2.js include), because WordPress is already loading it for you (you can see that in the source).

    And see if that clears up the issue.

    Thread Starter dvwb

    (@dvwb)

    I excluded the jQuery-1.3.2.js script from my header.php but it won’t help. If I also delete this line $scripts->add( 'jquery', '/wp-includes/js/jquery/jquery.js', false, '1.3.2'); from my script-loader.php file in wp-includes. It does work but then my gallery is messed up again.

    Have a read of the info on the following codex page and see if anything there helps.
    https://codex.www.ads-software.com/Function_Reference/wp_enqueue_script

    Check the links at the bottom of that page to, lots of valuable info there.

    I’m sure you’ve just got a script conflict somewhere, but i don’t think messing with the core files will fix this. If jQuery is loaded by WordPress it’s because a plugin needs it.. it doesn’t load front end otherwise.

    All i was saying before was to remove your manual include for jQuery so to avoid loading two versions, which is known to cause problems.

    Thread Starter dvwb

    (@dvwb)

    I fixed it. Thanks for all your help.
    I noticed that when I pressed the spacebar I went to the next image in the gallery. I simply turned this off in the script. Stupid that I hadn’t seen this before. And not being able to use the keyboard navigation isn’t that big of a deal.

    Anyway, thanks for your help.

    RJ

    You’re welcome, i did half think it could of been a keyboard hotkey for one of the scripts but figured since you never mentioned this is wasn’t the problem, that’ll teach me for making assumptions.

    Glad to hear you’ve got your problem resolved though…. ??

Viewing 14 replies - 1 through 14 (of 14 total)
  • The topic ‘Spacebar not working in forms’ is closed to new replies.