x First time here? Check out the FAQ
  • Avatar66posts86karma

    contour form using JQuery

    jayanthi started this topic July 8, 2011 @ 11:12, Go directly to the topic solution

    Hi All,

    I am new to umbraco contour, I am trying to show the contour form in JQuery modal window and trying to submit the data.

    I am successful to populate the form in modal,Can you please put some light how to submit the form to trigger the workflows defined on submit using JQuery, so that i can view the entered data in the entries.

  • Avatar1122posts2316karma
    Comment with ID: 82596
    Tim posted this reply July 8, 2011 @ 12:01

    You just need to click the submit button to submit the form and trigger any attached workflows, so you should just be able to call the click event on the button with jQuery if you want to submit the form using code. Is that what you're after?

  • Avatar66posts86karma
    Comment with ID: 82609
    jayanthi posted this reply July 8, 2011 @ 01:16

    Yes,I am trying to fire the event using JQuery and tried using JQuery.Form plugin(ajaxForm,AjaxSubmit) but not successfull in submitting the data,Can you please guide me to achieve this

  • Avatar1122posts2316karma
    Comment with ID: 82647
    Tim posted this reply July 8, 2011 @ 03:24

    If you want to just fire the click event of the button, you can just call $("PUT THE ID OF THE SUBMIT BUTTON HERE").click(); from Javascript.

    If you're wanting to submit the form via AJAX, you can't do that out of the box, you might want to look at Sebastian's rather excellent package that DOES allow you to do that: http://our.umbraco.org/projects/website-utilities/cultiv-restcontour using this package you can submit your forms to Contour with REST/AJAX etc.

    Hope that helps!


  • Avatar66posts86karma
    Comment with ID: 82648
    jayanthi posted this reply July 8, 2011 @ 03:34

    Click event is not doing any thing , workflows are not getting triggered.The page fields are not submitted.Can you please advice on it.

  • Avatar1122posts2316karma
    Comment with ID: 82651
    Tim posted this reply July 8, 2011 @ 03:39

    It sounds like you're trying to use AJAX for the form, which doesn't work (as explained in the last reply). I put a link to a package for umbraco that WILL allow you to do that. If you click on the link, and follow the instructions for the package there, you should be able to do what you want (hopefully)!


  • Avatar66posts86karma
    Comment with ID: 82654
    jayanthi posted this reply July 8, 2011 @ 03:56

    Tim, Here is my requirement,I need to populate a form in Jquery daialog and need to fetch few fields , i need to store the page fields as form entries or into database.

    For achieving this , I have opted to create a contour form and populated it on dialog, but i got stuck up at saving the entries. as nothing happening once i put the form in JQuery dialog.Apart from ajax,I need help why my form is not getting submitted .The form works fine if it is placed directly into the page ,

    Is it possible to submit the form when used in dialog?

    I am looking into the package mentioned ,Thank you for that. I am trying for various ways to submit not just using ajax.

  • Tim posted this reply July 8, 2011 @ 04:24

    Are you getting the form to appear in a modal style popup? If so, then that is probably the issue. Contour forms don't like being moved around the DOM, and when you do the forms stop working. The way we got round it is to have the form on a separate page and have that opened in an iframe in the popup. This gets round the problem of it not submitting, and also allows you to track how many people opened the form with Google Analytics!


  • Avatar66posts86karma
    Comment with ID: 82666
    jayanthi posted this reply July 8, 2011 @ 04:27

    ok...I will try for iframe workaround....Thank you

  • Avatar66posts86karma
    Comment with ID: 83055
    jayanthi posted this reply July 12, 2011 @ 12:31

    It worked for me....Thank you Tim :)



Please login or Sign up To post replies