PluginProbe
Bit Form – Contact Form, Payment Forms, Multi Step Forms, Calculator & Custom Form Builder / 2.9.1
Bit Form – Contact Form, Payment Forms, Multi Step Forms, Calculator & Custom Form Builder v2.9.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 2.10.2 All 137 releases
bit-form / assets / isFormValidatedWithoutError.min.js

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

2 lines 1.1 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 a=document.getElementById(e);a.classList.add("pos-rel","form-loading");let n=new FormData(document.getElementById(`form-${e}`));const o=window.bf_globals[e],{grecaptcha:r}=window;if("v3"===o?.gRecaptchaVersion&&o?.gRecaptchaSiteKey){const e=await r.execute(o?.gRecaptchaSiteKey,{action:"submit"});n.append("g-recaptcha-response",e)}"undefined"!=typeof advancedFileHandle&&(n=advancedFileHandle(o,n)),o.GCLID&&n.set("GCLID",o.GCLID),t&&n.set("form-current-step",t);const i=[];Object.entries(o?.fields||{}).forEach((e=>{e[1]?.valid?.hide&&i.push(e[0])})),i.length&&n.append("hidden_fields",i);const s=new URL(o.ajaxURL);s.searchParams.append("action","bitforms_before_submit_validate");const d=await fetch(s,{method:"POST",body:n}),c=await d.json();return a.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