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.

Calculations only work in preview

  1. ultramel123
    Member

    Hi. I have created some pricing and quantity fields in my form. All the calculations work perfectly when I preview the form, however when i view the page which has the form on it, then the calculations do not work. The calculated fields remain blank, and do not calculated.

    What could be the problem?

    Here is a link to my page which has the form:
    http://airport-game-lodge.co.za/?page_id=1951

    Posted 7 years ago on Friday August 10, 2012 | Permalink
  2. I got a 404 page not found for that link.

    If the calculations are not working on the live site but work in preview mode, you likely have a theme or plugin conflict with a JavaScript or jQuery error, which is preventing the Gravity Forms jQuery from working properly. You can begin testing by following these instructions http://rkt.gs/testing

    With a valid link to your form page we'll be able to help you out.

    Posted 7 years ago on Saturday August 11, 2012 | Permalink
  3. ultramel123
    Member

    Thank you for your reply. My apologies for the error, the page was set to "private".

    Here is the link -
    http://airport-game-lodge.co.za/?page_id=1951

    Thank you so much

    Posted 7 years ago on Sunday August 12, 2012 | Permalink
  4. You have a JavaScript error on the page which is preventing the Gravity Forms jQuery from performing the calculations.

    Timestamp: 8/13/2012 12:45:50 AM
    Error: TypeError: $(document).on is not a function
    Source File: http://airport-game-lodge.co.za/wp-content/plugins/jetpack/modules/sharedaddy/sharing.js?ver=0.1
    Line: 8

    Once you fix that, we can check for other errors and see if the calculations are working.

    Posted 7 years ago on Monday August 13, 2012 | Permalink
  5. ultramel123
    Member

    Thank you for your help Chris. I have disable the "sharing module" from Jetpack plugin, and also ticked the box to "disable css and js". however the page above is still not calculating my form?

    Any further advice would be greatly appreciated :-)

    thank you

    Posted 7 years ago on Monday September 17, 2012 | Permalink
  6. Where did you do this: "disable css and js"?

    You still have a script conflict going on. Troubleshooting it is going to be difficult for us from here. However, I see several general problems which need to be resolved before calculations will work.

    You are loading multiple versions of jQuery:
    https://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js?ver=1.6.4
    http://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.min.js

    Both versions are old. We use the jQuery version which is included with your WordPress version. You are loading other versions and that's the reason this is not working.

    You're also loading multiple jQuery UI datepicker scripts:
    http://airport-game-lodge.co.za/wp-includes/js/jquery/ui/jquery.ui.datepicker.min.js?ver=1.8.20
    http://airport-game-lodge.co.za/wp-content/plugins...avityforms/js/jquery-ui/ui.datepicker.js?ver=1.6.6

    The wp_enqueue_script function aims to eliminate these conflicts. Gravity Forms enqueues its scripts. It's possible your theme or some other plugins are hard-coding their scripts. In any event, you need to remove all these conflicting script versions and let WordPress enqueue the proper version of jQuery. At that point, your form calculations will work.

    Posted 7 years ago on Tuesday September 18, 2012 | Permalink
  7. ultramel123
    Member

    Thank you for your reply Chris. I have deactivated and deleted the "GD Star Rating" plugin which was loading the additional version of the date picker.

    How would I go about removing the out dated jquery versions?

    Thank you so much

    Posted 7 years ago on Saturday October 6, 2012 | Permalink
  8. You will have to find out which plugin or function in the theme is loading the outdated jQuery. Sometimes plugins load a specific version because their plugin is known to work with it. Sometimes the plugin will not work with the latest jQuery version.

    Finding where those files are added will be up to you. Every plugin does it differently.

    Posted 7 years ago on Monday October 8, 2012 | Permalink
  9. ultramel123
    Member

    Thank you Chris. I finally found it. It was a translation plugin which was loading ver 1.5.1. Once this plugin was disabled, the calculations work. Thank you so much

    Posted 7 years ago on Thursday October 18, 2012 | Permalink
  10. You're welcome. Thank you for the update.

    Posted 7 years ago on Wednesday October 24, 2012 | Permalink

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