Copied to clipboard

Flag this post as spam?

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


  • Arnim Anhut 137 posts 148 karma points
    Nov 05, 2013 @ 09:21
    Arnim Anhut
    0

    Countour form stops other razor forms working

    Hello,

    I have a page with some simple razor forms and a submit-button. They work as Long as there is no contour-form on the page.

    But as soon as I insert an contour-form (razor) the submit of the other forms stop working.

    When I look at the traffic by fiddler I can see, that as soon as I insert the contour-form the other submit Buttons on my forms stop sending their value when they are pressed .

    Any idea what's wrong or how to aviod the problem? Am I missing something?

    Thanx, Arnim.

  • Chriztian Steinmeier 2800 posts 8790 karma points MVP 8x admin c-trib
    Nov 05, 2013 @ 09:29
    Chriztian Steinmeier
    101

    Hi Arnim,

    This may be due to Contour's frontend JavaScript hijacking your submit button...

    Have a look in ~/umbraco/plugins/umbracoContour/scripts/Frontend/contourForm.js and find a line that says:

    $('input[type=submit]').click(function (evt) {
    

    Try changing that to:

    $('#contour input[type=submit]').click(function (evt) {
    

    This scopes the handler to only grab the Contour form's submit button and not try to validate your other forms with Contour's validators...

    Of course, there may be other things interfering, but this is one I've encountered myself :-)

    /Chriztian

  • Arnim Anhut 137 posts 148 karma points
    Nov 05, 2013 @ 09:53
    Arnim Anhut
    0

    Chriztian you're the man!

    I only looked at the HTML and just couldn't make out what's going wrong. Changing the selector did the trick for me.

    I hope they are updating the JS on the next version of Contour with this Change.

    Thanx again for your super fast answer!

  • Chriztian Steinmeier 2800 posts 8790 karma points MVP 8x admin c-trib
    Nov 05, 2013 @ 10:08
    Chriztian Steinmeier
    0

    You're welcome Arnim,

    I've created an issue for it, so let's keep our fingers crossed, shall we? :-)

    issues.umbraco.org/issue/CON-475

    /Chriztian

  • Alex 2 posts 22 karma points
    Jul 08, 2014 @ 14:47
    Alex
    0

    This is also a fix for user controls imported from visual studio.

    Many thanks for this!!

Please Sign in or register to post replies

Write your reply to:

Draft