PluginProbe
Bit Form – Contact Form, Payment Forms, Multi Step Forms, Calculator & Custom Form Builder / -3.0.1
Bit Form – Contact Form, Payment Forms, Multi Step Forms, Calculator & Custom Form Builder v-3.0.1
3.3.1 V-3.3.0 3.2.2 3.2.1 3.2.0 3.1.4 3.1.3 3.1.2 3.1.1 3.1.0 V3.0.3 V3.0.2 -3.0.1 V_3.0.0 1.1.1 1.1.8 1.2 1.3 1.4 1.4.18 1.5.2 1.9 2.0 2.10.0 2.10.1 All 138 releases
bit-form / assets / isFormValidatedWithoutError.min.js

isFormValidatedWithoutError.min.js in Bit Form – Contact Form, Payment Forms, Multi Step Forms, Calculator & Custom Form Builder -3.0.1, at assets/isFormValidatedWithoutError.min.js

2 lines 1.3 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 var isFormValidatedWithoutError=function(){"use strict";return async function(e,{step:t}={}){if("undefined"!=typeof validateForm&&!validateForm({form:e},{step:t}))return new Promise(((e,t)=>{t(new Error("Form is not valid"))}));const n=document.getElementById(e);n.classList.add("pos-rel","form-loading");let a=new FormData(document.getElementById(`form-${e}`));const d=window.bf_globals[e],{grecaptcha:i}=window;if("v3"===d?.gRecaptchaVersion&&d?.gRecaptchaSiteKey){const e=await i.execute(d?.gRecaptchaSiteKey,{action:"submit"});a.append("g-recaptcha-response",e)}"undefined"!=typeof advancedFileHandle&&(a=advancedFileHandle(d,a)),"undefined"!=typeof decisionFldHandle&&(a=decisionFldHandle(d,a)),"undefined"!=typeof hideChildFldHandle&&(a=hideChildFldHandle(d,a)),d.GCLID&&a.set("GCLID",d.GCLID),t&&a.set("form-current-step",t);const o=[];Object.entries(d?.fields||{}).forEach((e=>{e[1]?.valid?.hide&&o.push(e[0])})),o.length&&a.append("hidden_fields",o);const r=new URL(d.ajaxURL);r.searchParams.append("action","bitforms_before_submit_validate");const s=await fetch(r,{method:"POST",body:a}),c=await s.json();return n.classList.remove("pos-rel","form-loading"),c.success?new Promise((e=>{e(!0)})):(bfValidationErrMsg(c,e),new Promise(((e,t)=>{t(new Error("Form is not valid"))})))}}();
2