hi
trying to have jquery dialog kcik in a confirmation box 'i agree' and 'cancel' on a jquery dialogue box, but what seems to be happening is that the data gets posted to form save, but isnt getting past that, i,e its not redirecting. this is my code:
$("input[name='sendqq']").click(function(e) {
e.preventDefault();
fnOpenNormalDialog();
});
function fnOpenNormalDialog() {
$("#dialog-confirm").html("Confirm Dialog Box");
// Define the Dialog and its properties.
$("#dialog-confirm").dialog({
resizable: false,
modal: true,
title: "Modal",
height: 250,
width: 400,
buttons: {
"Yes": function () {
// $(this).dialog('close');
$("form[name='send']").submit();
// callback(true);
},
"No": function () {
$(this).dialog('close');
return false;
callback(false);
}
}
});
}
html code:
<form name="send" class="termspopup" id="question-form" role="form" action='' method='POST'>
<input type="hidden" name="nospam" />
<input type="hidden" value="Quick Question" name="Lead_Source">
<div class="h3"><span class="b-s">Got a </span><span class="b-p">Burning </span><span class="b-s">Question</span><span class="b-t">?</span></div>
<div class="form-group">
<label for="q-name">First Name*</label>
<input name='First_Name' required="" type="text" class="form-control" id="q-name" placeholder="" />
</div>
<div class="form-group">
<label for="q-name">Last Name*</label>
<input name='Last_Name' required="" type="text" class="form-control" id="q-name" placeholder="" />
</div>
<div class="form-group">
<label for="q-email">Email*</label>
<input name='Email' required="" type="email" class="form-control" id="q-email" placeholder="" />
</div>
<div class="form-group">
<label for="q-question">Question</label>
<textarea name='message' required="" class="form-control" id="q-question" rows="7"></textarea>
</div>
<div class="form-group">
<div class="col-sm-6">
<p class="small">*Open 24 hours a day, 7 days a week.</p>
</div>
<div class="col-sm-6 text-right">
<input type="submit" name="sendqq" value="Submit" class="btn btn-default" />
</div>
</div>
</form>
modx code
[[!FormIt?
&hooks=`hook.RampartFormit,spam,email,FormSave,sendToZoho,redirect`
&emailTpl=`send-qq-email`
&emailTo=`[email protected]`
&redirectTo=`81`
&submitVar=`sendqq`
&validate=`First_Name:required,
Last_Name:required,
Email:email:required,
nospam:blank,
message:required`
]]
the dialogue box is popping up
when you click on 'i agree' button, the form seems to be refreshing to itself and modx isnt initinalizing the redirect, or my bespoke snippet