1

i am using ajax webform module to submit a webform in block via ajax.the form is submitting properly with ajax without refreshing page. i want to hide a div on successful submision after validation ,so i want place a check either form is submitted sucessfully or not . what is the best way to accomplish this . i am using this code but its returning true even the form is vaildated or not .

 $( document ).ready(function() {
   $("#edit-webform-ajax-submit-15").click(function(){
    $.ajax({
    type: "POST",
    url: "http://xxxx/apptreetech/sites/all/modules/webform_ajax-7.x-1.1/webform_ajax/js/webform_ajax.js?n1uww0&_=1394090072820",
    dataType: "json",
    contentType: "application/json; charset=utf-8",
    complete: function (response) {
     console.log(response);

    },error: function () {
    alert("error is there");

    }
    });
    });
    });
  • if it is submitted i want to hide my from background div . I think user submit a webform Once.Not again is it right – SenthilKumar Mar 6 '14 at 12:40
  • Do U set limit to user for submit the webform? – SenthilKumar Mar 6 '14 at 13:09
  • got the answer it will be possible by adding desired css in confirmation template of web from page . – atom Mar 6 '14 at 13:59
  • If Do U share with me – SenthilKumar Mar 6 '14 at 14:01
  • please up vote than i will be able to share , still can't answer to my own question – atom Mar 6 '14 at 14:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.