Copied to clipboard

Flag this post as spam?

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


  • Graham Carr 277 posts 389 karma points
    Apr 04, 2013 @ 12:03
    Graham Carr
    0

    Custom Form Javascript Error

    I am using Contour V3.0.9 and have two custom forms created. These both have the default stylesheet disabled and have custom folders created in the \Umbraco\Plugins\umbracoContour\Views location. I have some conditions set on these forms so that when a radio button option is selected certain fields are hidden/shown.

    The issue I am having is that the conditional selection is not working and the fields aren't appearing. Checking the error console in FireFox shows a Javascript error being returned, details as follows:

    Timestamp: 04/04/2013 10:56:06
    Error: TypeError: $.validator is undefined
    Source File: http://therubberchickenroom.otbdigital.co.uk/umbraco/plugins/umbracocontour/scripts/frontend/contourform.js
    Line: 4

    Does anyone have any idea as to the cause of this? The problem also exists when previewing the form via the back-end Umbraco area. This problem only seemed to appear when I created the custom form folder.

  • Comment author was deleted

    Apr 04, 2013 @ 12:39

    Does the error also happen when you preview the form in the Contour section (not sure if that is where you are previewing)

  • Graham Carr 277 posts 389 karma points
    Apr 04, 2013 @ 12:42
    Graham Carr
    0

    Yes, the problem does also happen when previewing in the Contour section. If I remove the custom view folder then the preview starts working again but the form still doesn't work on the front-end, so it must be something to do with that but can't work out what.

  • Graham Carr 277 posts 389 karma points
    Apr 04, 2013 @ 12:45
    Graham Carr
    0

    You can see the error happening if you visit the following URL:

    http://therubberchickenroom.otbdigital.co.uk/registration.aspx

  • Comment author was deleted

    Apr 04, 2013 @ 12:45
  • Graham Carr 277 posts 389 karma points
    Apr 04, 2013 @ 12:51
    Graham Carr
    0

    I didn't have all of them added, however I can confirm that I have just added them as per the link above but the problem still remains.

  • Comment author was deleted

    Apr 04, 2013 @ 12:56

    Hi Graham,

    The error appaers to be gone now but the conditions don't work yet, if you take a look at the js you see that it is doing the following

    $("#443a6ed7-7a1a-4b36-be9b-1443b638fd4e").parent(".contourField").show();

    so looking for a specific element and the fetching the parent that has the class contourField but looks like you removed that class from the field container if you add that back it should work

  • Graham Carr 277 posts 389 karma points
    Apr 04, 2013 @ 13:04
    Graham Carr
    0

    Hi Tim,

    Thanks for that. I am unable to find which file the ".contourField" class is used in. I don't seem to be able to find it in the default form file or any of the control files?

  • Graham Carr 277 posts 389 karma points
    Apr 04, 2013 @ 13:08
    Graham Carr
    0

    After playing around a little, it is all working now apart from a bit of extra styling. Thank you so much for all of your prompt help!

  • Comment author was deleted

    Apr 04, 2013 @ 13:09

    Seems like you found it since it's working now on your page :)

Please Sign in or register to post replies

Write your reply to:

Draft