Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Steve Wilkinson 132 posts 211 karma points
    Apr 03, 2014 @ 16:27
    Steve Wilkinson
    0

    DatePicker works in preview but not on web form

    I'm using uLocalGovMVC for our templates and installed Contour.

    The datepicker is working correctly in the preview but on the published form (macro on page), the date picker doesn't appear, it only works as a text box.

     

  • Fuji Kusaka 2203 posts 4220 karma points
    Apr 03, 2014 @ 16:41
    Fuji Kusaka
    0

    Are you rendering with razor or usercontol?

    Try rendering with razor

  • Steve Wilkinson 132 posts 211 karma points
    Apr 04, 2014 @ 08:51
    Steve Wilkinson
    0

    I diopped a macro (of the contour form) into the text on the page - everything else works correctly, just the date picker doesn't

  • Fuji Kusaka 2203 posts 4220 karma points
    Apr 04, 2014 @ 09:14
    Fuji Kusaka
    0

    In preview mode inspect the javascript you might be missing some of them when rendering the form your template.

  • Steve Wilkinson 132 posts 211 karma points
    Apr 04, 2014 @ 10:24
    Steve Wilkinson
    0

    There is this code missing

    <script type="text/javascript" src="scripts/jquery-1.5.1.min.js"></script>
    <script type="text/javascript" src="scripts/jquery-ui-1.8.11.min.js"></script>
    <script type="text/javascript" src="scripts/jquery.validate.min.js"></script>
    <script type="text/javascript" src="scripts/jquery.validate.unobtrusive.min.js"></script>
    

    But if that's important js files, why isn't Contour generating that as part of the macro?

  • Steve Wilkinson 132 posts 211 karma points
    Apr 07, 2014 @ 08:34
    Steve Wilkinson
    0

    Kevin Jump did wonder if I need to add the Client Dependency Framework to the master pages - would that be correct and how would I go about doing that?

  • Steve Wilkinson 132 posts 211 karma points
    Apr 07, 2014 @ 08:46
  • Steve Wilkinson 132 posts 211 karma points
    Apr 10, 2014 @ 09:32
    Steve Wilkinson
    0

    Out of the box without adding the missing script files, I get (although the form submits and sends an email without any problem)

    Uncaught ReferenceError: jQuery is not defined contourform.js:57
    Uncaught ReferenceError: jQuery is not defined (index):413
    init: Chrome : 33 zozo.tabs.js:30
    event.returnValue is deprecated. Please use the standard event.preventDefault() instead. 
    

    If I add the missing script files I get

    Uncaught ReferenceError: jQuery is not defined contourform.js:57
    Uncaught ReferenceError: jQuery is not defined (index):413
    Uncaught ReferenceError: jQuery is not defined jquery.validate.unobtrusive.min.js:5
    Uncaught ReferenceError: jQuery is not defined jquery.validate.min.js:50
    GET http://umbraco.northdevon.gov.uk/font/fontawesome-webfont.woff?v=3.0.1 404 (Not Found) (index):392
    Uncaught ReferenceError: jQuery is not defined jquery-ui-1.8.11.min.js:22
    init: Chrome : 33 zozo.tabs.js:30
    event.returnValue is deprecated. Please use the standard event.preventDefault() instead. jquery-1.10.2.min.js:5
    

    either way, the datepicker doesn't appear when you click in the field.

  • Steve Wilkinson 132 posts 211 karma points
    Apr 29, 2014 @ 16:26
    Steve Wilkinson
    0

    I have got a bit further.

    If I don't add these files in the header, the form submits correctly but the date picker doesn't show

     <link rel="stylesheet" type="text/css" href="/umbraco/plugins/umbracocontour/css/jquery-ui-1.8.18.custom.css" />
     <link rel="stylesheet" type="text/css" href="/umbraco/plugins/umbracocontour/css/defaultform.css" />
     <script src="/umbraco/plugins/umbracoContour/scripts/jquery.validate.unobtrusive.min.js"></script>
     <script src="/umbraco/plugins/umbracoContour/scripts/jquery.validate.min.js"></script> 
     <script src="/umbraco/plugins/umbracoContour/scripts/jquery-ui-1.8.11.min.js"></script>
     <script src="/umbraco/plugins/umbracoContour/scripts/jquery-1.5.1.min.js"></script> 
    

    it does javascript console error with

    Uncaught ReferenceError: jQuery is not defined contourform.js:57
    Uncaught ReferenceError: jQuery is not defined (index):216
    Uncaught ReferenceError: jQuery is not defined jquery.validate.unobtrusive.min.js:5
    Uncaught ReferenceError: jQuery is not defined jquery.validate.min.js:50
    Uncaught ReferenceError: jQuery is not defined 
    

    If I add the files into the header at just before the </head>

    <link type="text/css" href="/umbraco/plugins/umbracocontour/css/jquery-ui-1.8.18.custom.css" rel="stylesheet" />    
    <link type="text/css" href="/umbraco/plugins/umbracocontour/css/defaultform.css" rel="stylesheet" />    
    <script type="text/javascript" src="/umbraco/plugins/umbracocontour/scripts/jquery-1.5.1.min.js"></script>
    <script type="text/javascript" src="/umbraco/plugins/umbracocontour/scripts/jquery-ui-1.8.11.min.js"></script>
    <script type="text/javascript" src="/umbraco/plugins/umbracocontour/scripts/jquery.validate.min.js"></script>
    <script type="text/javascript" src="/umbraco/plugins/umbracocontour/scripts/jquery.validate.unobtrusive.min.js"></script>
    

    then I don't get the jQuery is not defined errors and the date picker appears.

    All well and good apart from when I start entering data in the other fields I get

    Uncaught TypeError: Cannot read property 'call' of undefined jquery.validate.min.js:31
    

    and the form doesn't submit.

    does anyone have any ideas of how I can move forwad

  • Steve Wilkinson 132 posts 211 karma points
    Apr 29, 2014 @ 16:32
    Steve Wilkinson
    0

    I even created copies of the style sheets and javascript files so that they were called using /scripts/jquery-ui-1.8.11.min.js etc but that didn't make any difference.

  • Matthew Hardesty 22 posts 73 karma points
    Nov 20, 2014 @ 06:30
    Matthew Hardesty
    0

    Steve,

    Have you found a solution to this? I'm running into the same problem.

    Google hasn't yielded any working fixes.

  • Steve Wilkinson 132 posts 211 karma points
    Nov 21, 2014 @ 08:37
    Steve Wilkinson
    0

    Moriyama did a tweak to which jQuery file was loading which fixed it for about 10 minutes but it then stopped working again!

    Will get them to have another look in the next month (holiday and training courses getting in the way) and if we do solve it, I'll let you know.

  • keilo 568 posts 1023 karma points
    Jun 25, 2015 @ 03:53
    keilo
    1

    I came across the same issue with Contour form not showing the date picker. Once you ensure the jqueryui css,js along with the default included jquery js are in place,

    simply change your jquery js with following:

    <script src="//code.jquery.com/jquery-1.11.3.min.js"></script>
    <script src="//code.jquery.com/jquery-migrate-1.2.1.min.js"></script>

    the second one (migrate) ensures the obsolete msie detection routines are removed and lets the script run without errors, and datepicker works.

    as per (reference): http://jquery.com/download/#jquery-migrate-plugin

Please Sign in or register to post replies

Write your reply to:

Draft