PluginProbe
Bit Form – Contact Form, Payment Forms, Multi Step Forms, Calculator & Custom Form Builder / 3.1.2
Bit Form – Contact Form, Payment Forms, Multi Step Forms, Calculator & Custom Form Builder v3.1.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 3.1.2, at assets/setFieldValues.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 setFieldValues=function(){"use strict";return function(e){try{(e?[e]:Object.keys(window?.bf_globals||{})).forEach((e=>{const t=window.bf_globals[e],n=t?.oldValues||{},{fields:c}=t,i=["select","phone-number","country","currency","file-up","advanced-file-up","repeater"],o=["radio","check","decision-box","image-select","gdpr"],l=bfSelect(`#form-${e}`);Object.entries(c).forEach((([c,s])=>{const a=s.typ;let r=s.fieldName;const u=n[c];if(u)if(i.includes(a))t.inits[c].value=u;else if(o.includes(a)){"check"===a&&(r+="[]");const e=l.querySelectorAll(`input[name="${r}"]`),n=u?.split(t?.configs?.bf_separator)||[];if(e.forEach((e=>{if(n.includes(e.value)){e.checked=!0;const t=n.indexOf(e.value);n.splice(t,1)}})),e[0]?.dispatchEvent(new Event("input")),n.length){const e=l.querySelector(`[data-oopt="${c}"]`);if(e){e.checked=!0;const t=l.querySelector(`.${c}-cw input[data-bf-other-inp]`);t&&(t.value=n.join(", "),e.value=n.join(", "),e.dispatchEvent(new Event("input")))}}}else if(u){const t=document.querySelector(`#form-${e} [name="${r}"]`);t&&(t.value=u),t.dispatchEvent(new Event("input"))}}))}))}catch(e){}}}();
2