PluginProbe
Bit Form – Contact Form, Payment Forms, Multi Step Forms, Calculator & Custom Form Builder / 3.3.1
Bit Form – Contact Form, Payment Forms, Multi Step Forms, Calculator & Custom Form Builder v3.3.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
← All changes | assets/setFieldValues.min.js +1 -1 2.10.03.3.1 View file →
@@ -1 +1 @@
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)}}))}))}}();
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){}}}();