Well, the JavaScript code from Contour could use it's own jQuery in no-conflict mode? That way, you wouldn't have to worry or even care about jQuery being included on the website at all.
I've changed line 36 in the contourform.js file in 'umbraco\Plugins\umbracoContour\scripts\Frontend' when getting this error: Uncaught TypeError: undefined is not a function contourform.js:36
if ($(".datepickerfield").length > 0) { //checks if the page has a class with .datepickerfield
$(".datepickerfield").datepicker({ dateFormat: contourDateFormat });
}
disadvantage is that after upgrading you're losing the change
I had the same error as you and spent hours googling and making changes. I think you might be missing jquery.validate.unobtrusive script reference in the head of your document.
Within the head, make sure you have all these scripts. They are NOT installed to your template automatically.
Once I added them, I resolved errors related to contour.js.
clientside validation fails on contour 3
Hi
I have Umbraco version
Umbraco v6.1.3 (Assembly version: 1.0.4954.19342)
and Contour version 3
I run MVC on the website
It is a clean umbraco install, and clean contour install
I have made a simple form, consisting of 2 inputs (2 textstrings). One of the inputs is mandatory
I can insert the form onto my razor file, and the form appears.
PROBLEM
client side validation fails
It seems like jquery validate is not loaded at the right time or something.
If I comment out line 3-54 in contour.js file, and insert the plugins where all my other scripts for my website are, it works great
<script type="text/javascript" src="/Content/js/libs/jquery.validate.min.js"></script>
<script type="text/javascript" src="/Content/js/libs/jquery.validate.unobtrusive.min.js"></script>
Comment author was deleted
Yup you need to add the necessary client scripts
Details here http://umbraco.com/follow-us/blog-archive/2012/11/9/getting-started-with-contour-30-beta.aspx
Shouldn't they be included by default when you do a clean install of Countor in Umbraco 7?
Comment author was deleted
Yeah can add them to the form view but since most people already have jquery ... and don't think there is an easy way to inject them
Well, the JavaScript code from Contour could use it's own jQuery in no-conflict mode? That way, you wouldn't have to worry or even care about jQuery being included on the website at all.
I've changed line 36 in the contourform.js file in 'umbraco\Plugins\umbracoContour\scripts\Frontend' when getting this error: Uncaught TypeError: undefined is not a function contourform.js:36
to
disadvantage is that after upgrading you're losing the change
Johan,
I had the same error as you and spent hours googling and making changes. I think you might be missing jquery.validate.unobtrusive script reference in the head of your document.
Within the head, make sure you have all these scripts. They are NOT installed to your template automatically. Once I added them, I resolved errors related to contour.js.
is working on a reply...