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 Suddenly...

  1. I recently updated to the newest gravity forms release (version 1.6.4.5) and then attempted to finish a new form by adding in a date picker field. I have 2 forms on the site, both with a date picker field. The form that I added the date picker field to a few months ago works great (and I'm afraid to even breath on it for fear of the picker breaking :P )

    ...But this new date picker field isn't giving the java date picker popup. I looked around here briefly to see if anyone else was experiencing the same issue but didn't see anyone.

    I think I narrowed it down to the fact that the class "hasDatepicker" isn't being applied to the input field. Is this a bug or is my site messing things up a bit?

    Here's the link to the form and the date picker is the last field. http://www.maidonearth.com/green-cleaning-services/carpet-cleaning/

    Posted 10 years ago on Saturday June 30, 2012 | Permalink
  2. There is a JavaScript error preventing this from working properly:

    Timestamp: 6/30/2012 2:24:32 AM
    Error: expr is undefined
    Source File: http://www.maidonearth.com/wp-content/plugins/gravityforms/js/gravityforms.js?ver=1.6.4.5
    Line: 847

    That's the first report I've seen of that problem.

    Can you test your form in the preview and see if it works there? If not, a recent upgrade to either WordPress or Gravity Forms might have gone poorly. If it DOES work in preview mode, please begin by testing for plugin and theme conflicts.

    http://www.gravityhelp.com/documentation/page/Testing_for_a_Theme/Plugin_Conflict

    It's possible a recent plugin update may have broken something.

    Posted 10 years ago on Saturday June 30, 2012 | Permalink
  3. Yea, I've done a few test but nothing seems to help. And it doesn't make sense that a form on another page works fine but the this one doesn't....

    See this form it works fine - http://www.maidonearth.com/cleaning-estimate/

    Posted 10 years ago on Saturday June 30, 2012 | Permalink
  4. Does the date picker work in the preview for both forms?

    Posted 10 years ago on Saturday June 30, 2012 | Permalink
  5. Looking at the scripts, this is the only one present on the page where the date picker is not working and not present on the page where the date picker IS working:
    https://maps.gstatic.com/intl/en_us/mapfiles/422c/maps2/mod_mspe.js

    Not sure if that's related or not.

    You could also try swapping the form embed codes: put the code for the working form into the page where the date picker does NOT work, and see if that date picker still works. It might tell you if it's a problem with the page, or the form. The form preview will tell you if it's a problem with the form as well.

    Posted 10 years ago on Saturday June 30, 2012 | Permalink
  6. Ok, I figured out what the problem is....it's related to a hidden number field that I'm using that is calculating a value based upon numbers entered into the form. When I remove the calculation from the hidden field everything works great. Here is my calculation (in-case I wrote it wrong)

    ( {Stair Count:7} * 3 )  +  ( {Standard Rooms:8} * 35 )  +  ( {Large Rooms:9} * 52.5 )  +  ( {Hallways / Walk-in Closets:15} * 15 )

    Not sure if it's a bug or not...isn't the calculation a new feature?

    Posted 10 years ago on Sunday July 1, 2012 | Permalink
  7. Can you export that form as XML please and email it to me at chris@rocketgenius.com - thanks.

    Calculations were added in version 1.6.4.

    Posted 10 years ago on Sunday July 1, 2012 | Permalink
  8. I installed this form and tried the form preview, and the date picker works as expected there, and the calculation was performed and was stored with my entry.

    Is that not your experience when submitting the form from the form preview?

    Posted 10 years ago on Tuesday July 3, 2012 | Permalink
  9. This was in my notification email:

    To clean 1 standard sized rooms, 1 large rooms, 5 oversized rooms, 1 hallways/closets, and 17 steps is estimated to cost $153.5.

    Posted 10 years ago on Tuesday July 3, 2012 | Permalink
  10. Huh...yea, I got the calculation to work right and the notification email worked for me as well...but when I had the calculation in place it would prevent the date picker from loading.

    I even recreated the form again and it's still not working. When my formula is in place it takes away the class "hasDatepicker" from input for the date picker field. The page is giving me an "expr is undefined" error on the form page. It looks like its related to gravityforms.js and jQuery.

    That makes me wonder if it's related to my calculation...maybe I'll try to change the field names to not use spaces and see if that helps.

    Posted 10 years ago on Wednesday July 4, 2012 | Permalink
  11. One thing I just noticed is that when trying to submit the form with an invalid date, the validation message displays and then the date picker javascript works!

    Posted 10 years ago on Wednesday July 4, 2012 | Permalink
  12. Can you explain this please?

    I got the calculation to work right and the notification email worked for me as well...but when I had the calculation in place it would prevent the date picker from loading.

    The date picker did not work correctly for you still with the calculation in place when using the form preview?

    Posted 10 years ago on Wednesday July 4, 2012 | Permalink
  13. Actually, it does work in the form preview. Could you take a look at the javascript error message and tell me what you think? I'm new to javascript and can't decipher it. The page is http://www.maidonearth.com/green-cleaning-services/carpet-cleaning/#carpetestimate

    Posted 10 years ago on Thursday July 5, 2012 | Permalink
  14. If the date picker works in the preview, but not the live page with the form, you have a plugin or theme conflict, or there is other JavaScript in the page where the form is embedded, causing this problem.

    Did you already try embedding the form into a new page and see if the date picker works there?

    You can check for theme and plugin conflicts by testing as described here:
    http://rkt.gs/testing

    We're sort of starting over from scratch here since the date picker does work as expected in the form preview.

    Posted 10 years ago on Friday July 6, 2012 | Permalink