PLEASE NOTE: These forums are no longer utilized and are provided as an archive for informational purposes only. All support issues will be handled via email using our support ticket system. For more detailed information on this change, please see this blog post.

Next and Previous buttons broken

  1. I'm using the "WooCommerce - Gravity Forms Product Add-Ons" plugin for WordPress

    The site, and specific location of the problem: http://artbyandrew.com/jeanhouston/marketplace/monochrome-to-color-expanding-the-depth-breadth-and-bandwidth-of-your-life

    So, as you can see the next button does nothing and the checkout button goes to the next step of the form.

    When you're on step 2 the previous button also does not work

    Posted 11 years ago on Monday January 14, 2013 | Permalink
  2. jQuery is being loaded in the form twice, one version 1.8.3 by WordPress and one direct from jQuery:

    <script type='text/javascript' src='http://artbyandrew.com/jeanhouston/wp-includes/js/jquery/jquery.js?ver=1.8.3'></script>
    
    <script src="http://code.jquery.com/jquery-latest.min.js" type="text/javascript"></script>

    If you can. remove the link to the jquery-latest-min.js. I think that is the source of your problem.

    Posted 11 years ago on Tuesday January 15, 2013 | Permalink
  3. Thanks for getting back to me Chris! I just tried taking out the "jquery-latest-min.js", to no avail!

    The next and previous buttons still don't work, only the "Add to Cart" button pushes the form to the next page!

    Any other ideas?

    Thanks in advance!

    Posted 11 years ago on Tuesday January 15, 2013 | Permalink
  4. I see both references to jQuery in the source of the page still. Can you remove the one from jQuery please then leave it out until we can test? Thank you.

    Posted 11 years ago on Tuesday January 15, 2013 | Permalink
  5. I did find: if I switch the input TYPE on the next button from type="button" to "submit", it does indeed work when clicked!

    But, that's not a solution, sadly -- just another piece of information.

    Posted 11 years ago on Tuesday January 15, 2013 | Permalink
  6. Sorry about that Chris, I did remove it, then added it again (before you had the chance to look, oops!).

    Now, I have taken out the "jquery-latest-min.js" line

    Thanks again for your help

    Posted 11 years ago on Tuesday January 15, 2013 | Permalink
  7. I can see the problem now: thank you. The buttons are not working because of this JavaScript error:

    Timestamp: 1/15/2013 4:35:39 PM
    Error: ReferenceError: jQuery is not defined
    Source File: http://artbyandrew.com/jeanhouston/marketplace/monochrome-to-color-expanding-the-depth-breadth-and-bandwidth-of-your-life
    Line: 29

    This is the code which starts on line 29 (from the source of the page):

    jQuery(function($){
    
    		$('.circle').mosaic({
    			opacity		:	0.8			//Opacity for overlay (0-1)
    		});
    
    		$('.fade').mosaic();
    
    		$('.bar').mosaic({
    			animation	:	'slide'		//fade or slide
    		});
    
    		$('.bar2').mosaic({
    			animation	:	'slide'		//fade or slide
    		});
    
    		$('.bar3').mosaic({
    			animation	:	'slide',	//fade or slide
    			anchor_y	:	'top'		//Vertical anchor position
    		});
    
    		$('.cover').mosaic({
    			animation	:	'slide',	//fade or slide
    			hover_x		:	'400px'		//Horizontal position on hover
    		});
    
    		$('.cover2').mosaic({
    			animation	:	'slide',	//fade or slide
    			anchor_y	:	'top',		//Vertical anchor position
    			hover_y		:	'80px'		//Vertical position on hover
    		});
    
    		$('.cover3').mosaic({
    			animation	:	'slide',	//fade or slide
    			hover_x		:	'400px',	//Horizontal position on hover
    			hover_y		:	'300px'		//Vertical position on hover
    		});
    
    	});

    That depends on jQuery but jQuery is not yet loaded in the page. Move that to somewhere after jQuery is enqueued or enqueue it properly with a dependency on jQuery and this error will go away.

    There is an additional error as well:

    Timestamp: 1/15/2013 4:35:39 PM
    Error: ReferenceError: $ is not defined
    Source File: http://artbyandrew.com/jeanhouston/marketplace/monochrome-to-color-expanding-the-depth-breadth-and-bandwidth-of-your-life
    Line: 74

    This is the code creating that error:

    $(document).ready(function(){
    
        $(".slidingDiv").hide();
    	$(".show_hide").show();
    
    	$('.show_hide').click(function(){
    	$(".slidingDiv").slideToggle();
    	});
    
    });

    That has two problems. 1) you cannot use $ as a function in WordPress (you need to rewrite the code as jQuery(document).ready(function($){ for example). And 2), it depends on jQuery as well, and, same as the previous error, jQuery has not been loaded.

    Once you fix those errors, we can take another look for JavaScript errors if the buttons continue to not work.

    Posted 11 years ago on Tuesday January 15, 2013 | Permalink
  8. Thanks again for your help Chris, I really appreciate it!

    I fixed the "show hide" script and moved both that and the mosiac.js and mosiac script to the footer.

    Now, I'm seeing a "jQuery cycle" error, not totally sure how to fix that one!

    EDIT: my "Meteor Slides" plugin was causing the error, I've disabled it for troubleshooting purposes, but: no luck!

    Any ideas?

    Posted 11 years ago on Tuesday January 15, 2013 | Permalink
  9. It's amazing how many things can be wrong, then fixed, and STILL not affect the function of the form.

    I see some comment-looking debug stuff in the source now, although the comments are not valid (the comment begins <!--- with 3 hyphens, and ends the same way.) The comment should begin <!-- with two hyphens and a space, and then end --> with a space preceding the two hyphens.

    Not sure if that's related at all, but I did see that. Maybe it's temporary.

    Posted 11 years ago on Tuesday January 15, 2013 | Permalink
  10. I also see this error at the end of the page:

    <b>Fatal error</b>:  Call to undefined function login_with_ajax() in <b>/home/artbya5/public_html/jeanhouston/wp-content/plugins/wp-php-widget/wp-php-widget.php(52) : eval()'d code</b> on line <b>37</b><br />

    And the page did not finish loading. Maybe because the footer is not loading the required scripts are not loading? Can you fix this error and see if the page will load completely?

    Posted 11 years ago on Tuesday January 15, 2013 | Permalink
  11. Ah, that was a script that I just added to debug queued scripts -- I fixed that comment issue and as you expected: no change.

    I've actually removed that piece of code (it was in functions.php) -- something that I had added earlier today.

    It is very strange that we've fixed all of this and nothing on the form has changed!

    I'll keep trying!

    Posted 11 years ago on Tuesday January 15, 2013 | Permalink
  12. How about my last comment? We may have crossed posts.

    Posted 11 years ago on Tuesday January 15, 2013 | Permalink
  13. I think we definitely did cross posts -- I think that error came about because I disabled a plugin called: wp-php-widget (for troubleshooting purposes)

    I've now re-activated it, do you still see the error? (I don't when inspecting in chrome)

    Posted 11 years ago on Tuesday January 15, 2013 | Permalink
  14. It's still present and visible in the page.

    Fatal error: Call to undefined function login_with_ajax() in /home/artbya5/public_html/jeanhouston/wp-content/plugins/wp-php-widget/wp-php-widget.php(52) : eval()'d code on line 37

    I didn't need to inspect anything at all. It's visible to the public at the bottom of the page.

    Posted 11 years ago on Tuesday January 15, 2013 | Permalink
  15. Ah, my mistake! I couldn't see this error since I was logged in!

    I took out that piece of PHP for now and the error is gone, but the original problem still stands!

    Posted 11 years ago on Wednesday January 16, 2013 | Permalink
  16. OK. Like I said. Hard to see how so many problems are found and fixed but the problem persists. In any case, I looked again. I don't see any obvious problems now. Does your form work properly without Woocommerce active? Or, can you test in the form preview to see if it works there? I'm not sure how the integration with Woocommerce works.

    Posted 11 years ago on Wednesday January 16, 2013 | Permalink
  17. So, it's 100% something to do with WooCommerce itself (I think!), because the pagination for forms works on other parts of the site: http://artbyandrew.com/jeanhouston/about-jean/invite-jean-to-speak

    Posted 11 years ago on Wednesday January 16, 2013 | Permalink
  18. Have you already checked their forums for someone else who may have reported this problem?

    Posted 11 years ago on Wednesday January 16, 2013 | Permalink
  19. Yeah, I'm double-checking the forum right now, shoot!

    I'll let you know if I discover anything.

    Posted 11 years ago on Wednesday January 16, 2013 | Permalink
  20. Thanks - we'll wait to hear back from you.

    Posted 11 years ago on Wednesday January 16, 2013 | Permalink
  21. No dice, but I've posted on WooCommerce support forums and WordPress (WooCommerce) support forums:

    http://support.woothemes.com/entries/22939227-gravity-forms-addon-for-woocommerce-next-and-previous-buttons-fail

    http://wordpress.org/support/topic/gravity-forms-addon?replies=1#post-3732184

    I will update here if I have any answers

    Posted 11 years ago on Wednesday January 16, 2013 | Permalink
  22. bump? Still hoping someone can help me tackle this!

    Posted 11 years ago on Wednesday January 16, 2013 | Permalink
  23. Since you buttons work properly on other forms on your site, I think the issue is with Woocommerce. I don't have any other troubleshooting ideas.

    Posted 11 years ago on Wednesday January 16, 2013 | Permalink
  24. We're looking at another issue which appears to be related to Woocommerce as well:

    http://www.gravityhelp.com/forums/topic/file-attachment-error

    The image attachment works properly when submitted from the form preview, and the site in question there is using Woocommerce as well.

    Posted 11 years ago on Wednesday January 16, 2013 | Permalink
  25. ericcovarrubias
    Member

    I was having this same problem and discovered a potential solution or at the very least what is causing the problem. If you go into the Admin dashboard and go to the WooCommerce Product in question look at the section where you specify which Gravity Form to use on that product page. Go to the "Total Calculations" tab and I'm guessing you have the Disable Calculations box checked? If that is the case... uncheck it (even if the other three are all checked) and update the product. Amazingly, the Add To Cart button disappears now until the final page of your multipage form or the conditional submit button logic for your form is met... and more importantly the Next and Previous buttons should work. I have no idea why this happens but I discovered it by accident and it fixed this issue for me. Good luck and I hope it works for you too!

    Posted 11 years ago on Friday January 25, 2013 | Permalink

This topic has been resolved and has been closed to new replies.