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.

Date Picker Not Working

  1. robobobo
    Member

    Hey guys,

    I know there seems to be a fair few people with this problem, but I can't seem to fix it at all. Maybe one of you experts could have a look for me?

    I've got 3 date picker fields (trying to test them and get them to work) on this page http://competitions.social365.ie/?page_id=29

    As you can see, none of them work. I've only got 3 plugins on the site - gravity forms, custom post types and advanced custom fields. I disabled them all anyway to rule them out (except for gravity forms of course) and the date picker still doesn't work.

    The date picker does work in preview mode and also when I activate the 2011 wordpress theme. However not in this theme that I'm currently building from scratch. There's no javascript or jquery in the site at all which is what has me stumped and I can't see any errors. Can someone give me a hand here as this date picker is central to my site

    Thanks for your help!

    Posted 12 years ago on Thursday July 12, 2012 | Permalink
  2. David Peralty

    What version of WordPress and Gravity Forms are you using? In Gravity Forms' settings, what toggle switches do you have set? The date picker does work in preview mode, and in Twenty-Eleven, it is definitely some conflict with the theme, but I don't see any JavaScript errors listed when I use Chrome's Inspect tool, so I'm at a bit of a loss as well.

    Posted 12 years ago on Friday July 13, 2012 | Permalink
  3. robobobo
    Member

    I'm using gravity forms Version 1.6.4.5.4 and Wordpress Version 3.4.1.

    I have the following settings checked:
    Output CSS - YES
    Output HTML5 - NO
    No Conflict Mode - OFF (I've also tried this on)

    Yes I'm stumped too, I mean I've started this theme from scratch and there's very little code in it at all really. But yet it still works on Twenty-Eleven and as you said there's no errors...

    Posted 12 years ago on Friday July 13, 2012 | Permalink
  4. Did you embed the form into that page using the shortcode method, or did you use a function call in the page template? It does not look like the datepicker JavaScript is present. These two scripts are missing:

    /plugins/gravityforms/js/jquery-ui/ui.datepicker.js?ver=1.6.4.5
    /plugins/gravityforms/js/datepicker.js?ver=1.6.4.5

    Posted 12 years ago on Friday July 13, 2012 | Permalink
  5. robobobo
    Member

    I'm calling it via the shortcode method, it's almost as if something is stripping out the javascript which just makes no sense as there is nothing in place that could do this. I might try adding it in manually and see if I can make it work that way

    Update:
    I hard coded in the javascript into to my head and now it's working! But it's still quite odd that it's not being added in automatically is it not?

    Posted 12 years ago on Saturday July 14, 2012 | Permalink
  6. With the shortcode method, the scripts should be enqueued automatically by Gravity Forms. Is there anything on your site that interferes with shortcode processing? Anything in your theme's functions.php that could cause this?

    Hard coding the scripts will work for a while, but is not a good solution. You need to find the root of the problem.

    Can you set up a temporary page using a new page template, and call the form with the function call, and enqueue the scripts manually? It might help narrow the problem down.

    Is it possible you have something strange going on with your subdomains of www and competitions? Your WordPress URL and website URL in the wp-admin options page? I see you hard coded the scripts with a different domain than where the website is located.

    Is it possible your site is at www. but this page lives at competitions.?

    Posted 12 years ago on Sunday July 15, 2012 | Permalink
  7. robobobo
    Member

    Thanks for your reply Chris.

    I've now created a new page template for testing this out as you said
    http://www.competitions.social365.ie/?page_id=100

    I've also added the form in via the function call instead of the shortcode method. I'm also using the enqueue function to call the relevant scripts, however it doesn't seem to be adding in any scripts that I can see. They should be in the source code just before the div "blog" but there doesn't seem to be anything there,

    I've also changed the wordpress urls all to www. (this site is used primarily for testing and development so I didn't really worry with those sort of things)

    As you can see, the test page still doesn't have the date picker working, where as the share competition page does since I've hardcoded in the scripts there

    Posted 12 years ago on Sunday July 15, 2012 | Permalink
  8. Seems to me that it's related to the URLs and subdomains.

    Can you export your form and send it to chris@rocketgenius.com please? I will install it here and see if there is a problem with the form or if the problem exists on your server. Thank you.

    Posted 12 years ago on Monday July 16, 2012 | Permalink
  9. robobobo
    Member

    I've sent it to you now. I've now moved the site to it's final domain to rule out subdomains and I still have the same issue

    http://www.fbcompetitions.com/?page_id=29

    Posted 12 years ago on Tuesday July 17, 2012 | Permalink
  10. robobobo
    Member

    Just for everyone else for future reference. The problem was that I had forgotten to call

    [php]
    <?php wp_footer(); ?>

    in my footer which is needed to add in the necessary javascript

    Posted 12 years ago on Monday July 23, 2012 | Permalink

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