1

I'm using Parsley.js 2.0.0 and am trying to use it along with the Malsup jQuery form plugin. What I can't figure out is how to combine the two so that Parsley runs the validation first, then if true, proceeds to submit the form.

I see the "beforeSubmit" option with Form, but can't figure out how to add in Parsley.

My code at the moment is:

    $(document).ready(function() {
    $('#contactus').ajaxForm({

        target: '#statusResetResponse',
        success: function () {
            $.gritter.add({
                title: "title",
                text: "text here",
                time: '2000'
            });
            return false;
        }

    }); 
});

Thanks in advance for any suggestions.

  • Update: I decided to dump jQuery Form and go with straight jQuery and this question/answer helped solve the problem - I basically just needed an if statement: http://stackoverflow.com/questions/22781490/trigger-parsley-validation-without-submit-form – BlueMondayDesign Jul 12 '14 at 19:34

0 Answers0