I have implemented Sweetalert on my jQuery.validationEngine but the button "Accept" of sweetalert doesn't run the "submit", What could add to make it work?
This is the code with Sweetalert:
$(document).ready(function(){
$("#id_form").validationEngine('attach',{
onValidationComplete:function(form, status){
if (status === true){
if(swal({title: "Confirm text?",text: "Another Text",type: "warning",showCancelButton: true,confirmButtonColor: "#DD6B55",confirmButtonText: "Accept",cancelButtonText: "Cancel"closeOnConfirm: true,closeOnCancel: false})){
form.validationEngine('detach');
submit();
}}}
});
})
Without Sweetalert and running:
$(document).ready(function(){
$("#id_form").validationEngine('attach',{
onValidationComplete:function(form, status){
if (status === true){
if(confirm("Confirm text?")){
form.validationEngine('detach');
submit();
}}}
});
})
References:
first of all you should insert comma after "Cancel" string. Adapt your code according to below