PluginProbe ʕ •ᴥ•ʔ
SureForms – Contact Form Builder, AI Forms, Payment Form, Survey & Quiz / trunk
SureForms – Contact Form Builder, AI Forms, Payment Form, Survey & Quiz vtrunk
2.12.5 2.12.4 2.12.3 2.12.2 2.12.1 2.12.0 2.11.1 2.11.0 2.10.1 2.10.0 2.9.1 2.9.0 2.8.2 2.8.1 2.7.0 2.7.1 2.8.0 trunk 0.0.10 0.0.11 0.0.12 0.0.13 0.0.2 0.0.3 0.0.4 0.0.5 0.0.6 0.0.7 0.0.8 0.0.9 1.0.0 1.0.1 1.0.2 1.0.3 1.0.4 1.0.5 1.0.6 1.0.7 1.1.0 1.1.1 1.1.2 1.10.0 1.10.1 1.11.0 1.12.0 1.12.1 1.12.2 1.12.3 1.13.0 1.13.1 1.13.2 1.2.0 1.2.1 1.2.2 1.2.3 1.2.4 1.2.5 1.3.0 1.3.1 1.3.2 1.4.0 1.4.1 1.4.2 1.4.3 1.4.4 1.4.5 1.5.0 1.5.1 1.6.0 1.6.1 1.6.2 1.6.3 1.6.4 1.6.5 1.7.0 1.7.1 1.7.2 1.7.3 1.7.4 1.8.0 1.9.0 1.9.1 2.0.0 2.0.1 2.0.2 2.1.0 2.1.1 2.2.0 2.2.1 2.2.2 2.3.0 2.4.0 2.5.0 2.5.2 2.6.0
sureforms / assets / js / minified / blocks / multi-choice.min.js
sureforms / assets / js / minified / blocks Last commit date
dropdown.min.js 1 month ago input.min.js 8 months ago multi-choice.min.js 4 months ago number.min.js 10 months ago phone.min.js 2 months ago switch.min.js 1 year ago textarea.min.js 4 months ago url.min.js 1 year ago
multi-choice.min.js
1 lines
1 function initializeMultichoice(){var e=document.querySelectorAll(".srfm-multi-choice-block");e&&e.forEach(c=>{let r=[],n="";(()=>{var e=c.querySelector(".srfm-input-multi-choice-hidden"),i=c.querySelectorAll(".srfm-input-multi-choice-single:checked");if(e&&0!==i.length)if(c.classList.contains("srfm-radio-mode")){var l=i[0].closest(".srfm-multi-choice-single").querySelector("label");l&&(e.setAttribute("value",l.getAttribute("data-option-text")||l.innerText),e.dispatchEvent(new Event("change",{bubbles:!0})),n=e.getAttribute("value")||"")}else if(c.classList.contains("srfm-checkbox-mode")){let t=[];i.forEach(e=>{e=e.closest(".srfm-multi-choice-single").querySelector("label");e&&t.push(e.getAttribute("data-option-text")||e.innerText)}),r=[...t];l=window.srfm.srfmUtility.prepareValue(t);e.setAttribute("value",l),e.dispatchEvent(new Event("change",{bubbles:!0}))}})();c.querySelectorAll(".srfm-multi-choice-single")?.forEach(i=>{i.addEventListener("click",e=>{var t;e.target.matches("label")||(t=i.querySelector(".srfm-input-multi-choice-single"))&&(t.click(),e.stopPropagation())})});var e=c.querySelectorAll(".srfm-input-multi-choice-single");let l;e?.forEach(e=>{e.addEventListener("click",t=>{t.stopPropagation();var i=t.target.closest(".srfm-multi-choice-single").querySelector("label"),i=(l=i?i.getAttribute("data-option-text")||i.innerText:"",c.querySelector(".srfm-input-multi-choice-hidden"));if(i&&l){let e=null;c.classList.contains("srfm-radio-mode")?n=n===l?(t.target.checked=!1,e=""):e=l:c.classList.contains("srfm-checkbox-mode")&&(r=t.target.checked?[...r,l]:r.filter(e=>e!==l),e=window.srfm.srfmUtility.prepareValue(r)),null!==e&&i.setAttribute("value",e),i.dispatchEvent(new Event("change",{bubbles:!0}))}})})})}document.addEventListener("DOMContentLoaded",initializeMultichoice);