PluginProbe
Bit Form – Contact Form, Payment Forms, Multi Step Forms, Calculator & Custom Form Builder / 2.10.2
Bit Form – Contact Form, Payment Forms, Multi Step Forms, Calculator & Custom Form Builder v2.10.2
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 / setFieldValues.min.js

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

2 lines 1006 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 var setFieldValues=function(){"use strict";return function(e){(e?[e]:Object.keys(window?.bf_globals||{})).forEach((e=>{const c=window.bf_globals[e],t=c?.oldValues||{},{fields:n}=c,i=["select","phone-number","country","currency","file-up","advanced-file-up","repeater"],o=["radio","check","decision-box"],l=bfSelect(`#form-${e}`);Object.entries(n).forEach((([n,s])=>{const a=s.typ;let r=s.fieldName;const u=t[n];if(u)if(i.includes(a))c.inits[n].value=u;else if(o.includes(a)){"check"===a&&(r+="[]");const e=l.querySelectorAll(`input[name="${r}"]`),t=u?.split(c?.configs?.bf_separator)||[];if(e.forEach((e=>{if(t.includes(e.value)){e.checked=!0;const c=t.indexOf(e.value);t.splice(c,1)}})),t.length){const e=l.querySelector(`[data-oopt="${n}"]`);if(e){e.checked=!0;const c=l.querySelector(`.${n}-cw input[data-bf-other-inp]`);c&&(c.value=t.join(", "),e.value=t.join(", "),e.dispatchEvent(new Event("input")))}}}else if(u){const c=document.querySelector(`#form-${e} [name="${r}"]`);c&&(c.value=u)}}))}))}}();
2