function onSubmit(token){ //alert(token); $(".msg-status-row .alert").html("Successfully Validated! Please wait while processing your request.").removeClass("alert-danger").removeClass("alert-info").addClass("alert-success"); $(".msg-status-row .alert").slideDown(); $("#contact-us").submit(); return false; };
$(window).load(function(){
$("#contact-us").bootstrapValidator({
message: "This value is not valid", excluded: [":disabled"], feedbackIcons: { valid: "glyphicon glyphicon-ok", invalid: "glyphicon glyphicon-remove", validating: "glyphicon glyphicon-refresh" }, fields: { full_name: { group: ".response-field-text", validators: { notEmpty: { message: "Full Name is required and cannot be empty" } } },email: { group: ".response-field-email", validators: { notEmpty: { message: "Email is required and cannot be empty" }, emailAddress: { message: "Value is not a valid email address" } } },phone: { group: ".response-field-text", validators: { notEmpty: { message: "Phone is required and cannot be empty" } } },"gdpr_compliance[]": { group: ".response-field-checkboxes", validators: { /*choice: { min: 2, max: 4, message: "Please choose 2 - 4 programming languages you are good at" },*/ notEmpty: { message: "Please accept GDPR Compliance" } } }, }
}) .on("success.form.bv", function(e) {
// Prevent form submission e.preventDefault();$(this).unbind( e ); grecaptcha.execute(); });
$("#resetBtn").click(function() { $("#contact-us").data("bootstrapValidator").resetForm(true); grecaptcha.reset(); $(".form-control").attr("value", ""); });
});