# bit-form/3.3.1/assets/bf-879-214.js

Bit Form – Contact Form, Payment Forms, Multi Step Forms, Calculator &amp; Custom Form Builder, version 3.3.1. 2 lines.

- Page: https://pluginprobe.com/plugins/bit-form/3.3.1/code/assets/bf-879-214.js
- Raw: https://pluginprobe.com/plugins/bit-form/3.3.1/raw/assets/bf-879-214.js
- Modified: 2026-09-16T12:36:52+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/bit-form/3.3.1/code/assets/bf-879-214.js#L10-L20`.

```javascript
var C=Object.defineProperty,I=Object.defineProperties;var _=Object.getOwnPropertyDescriptors;var u=Object.getOwnPropertySymbols;var $=Object.prototype.hasOwnProperty,L=Object.prototype.propertyIsEnumerable;var g=(t,r,o)=>r in t?C(t,r,{enumerable:!0,configurable:!0,writable:!0,value:o}):t[r]=o,f=(t,r)=>{for(var o in r||(r={}))$.call(r,o)&&g(t,o,r[o]);if(u)for(var o of u(r))L.call(r,o)&&g(t,o,r[o]);return t},b=(t,r)=>I(t,_(r));import{g as F,i as N,u as k,m as A,H as T,a as E,j as p,I as q,h as R,_ as H,em as B,f as m,bI as c,aY as K,b1 as M}from"./main-762.js";import{F as n}from"./bf-850-326.js";import{S as v}from"./bf-111-180.js";import{S as z}from"./bf-45-176.js";import{E as V}from"./bf-642-167.js";import"./bf-685-46.js";import"./bf-848-68.js";import"./bf-81-43.js";import"./bf-871-60.js";/* empty css         */import"./bf-435-62.js";import"./bf-653-63.js";import"./bf-775-182.js";import"./bf-557-57.js";import"./bf-874-177.js";import"./bf-517-178.js";import"./bf-734-179.js";import"./bf-610-181.js";import"./bf-769-183.js";import"./bf-486-184.js";import"./bf-726-185.js";import"./bf-740-186.js";import"./bf-206-187.js";import"./bf-383-45.js";import"./bf-241-52.js";import"./bf-564-188.js";import"./bf-897-55.js";import"./bf-874-189.js";import"./bf-798-190.js";import"./bf-330-191.js";import"./bf-968-323.js";import"./bf-842-324.js";import"./bf-747-208.js";import"./bf-537-206.js";import"./bf-924-210.js";import"./bf-466-325.js";import"./bf-921-212.js";import"./bf-424-327.js";import"./bf-820-328.js";function $e(){const{fieldKey:t}=F(),[r,o]=N(M),O=k(A),e=T(r[t]),{css:a}=E(),d=e.adminLbl||"",y=s=>{var h;if(!q)return;s.target.checked?(e.addOtherOpt=!0,e.valid.otherOptReq=!0,e.err||(e.err={}),e.err.otherOptReq||(e.err.otherOptReq={}),e.err.otherOptReq.dflt=((h=O==null?void 0:O.err)==null?void 0:h.otherOptReq)||'<p style="margin:0">Custom Option Required</p>',e.err.otherOptReq.show=!0,B(t,"otherOptions")):(delete e.valid.otherOptReq,delete e.addOtherOpt);const i=s.target.checked?"Add":"Remove",l=m(r,j=>{j[t]=e});o(l),c({event:`${i} Other Option: ${e.lbl||d||t}`,type:`${i.toLowerCase()}_Other_Option`,state:{fields:l,fldKey:t}}),K(t)},x=s=>{s.target.checked?(e.valid.otherOptReq=!0,e.err||(e.err={}),e.err.otherOptReq||(e.err.otherOptReq={}),e.err.otherOptReq.dflt='<p style="margin:0">Custom Option Required</p>',e.err.otherOptReq.show=!0):delete e.valid.otherOptReq;const i=s.target.checked?"Requred":"Optional",l=m(r,h=>{h[t]=e});o(l),c({event:`${i} Required Other Option: ${e.lbl||d||t}`,type:`${i.toLowerCase()}_Other_Option`,state:{fields:l,fldKey:t}})},P=s=>{s.target.checked?(e.otherInpPh="Write Custom Option...",e.otherPhShow=!0):(e.otherPhShow=!1,delete e.otherInpPh);const i=s.target.checked?"Show":"Hide",l=m(r,h=>{h[t]=e});o(l),c({event:`${i} Placeholder: ${e.lbl||d||t}`,type:`${i.toLowerCase()}_placeholder`,state:{fields:l,fldKey:t}})},w=s=>{e.otherOptLbl=s.target.value;const i=m(r,l=>{l[t]=e});o(i),c({event:`Other Option Label updated: ${e.lbl||d||t}`,type:"change_other_option_label",state:{fields:i,fldKey:t}})};function S(s){s.target.value===""?delete e.otherInpPh:e.otherInpPh=s.target.value;const i=m(r,l=>{l[t]=e});o(i),c({event:`Other Input Placeholder updated: ${e.lbl||d||t}`,type:"change_placeholder",state:{fields:i,fldKey:t}})}return p.jsx(z,b(f({id:"other-opt-stng",title:H("Allow Other Option"),className:a(n.fieldSection,n.hover_tip),switching:!0,tip:"An option will be added as labelled 'Other...' to get custom input from the user",tipProps:{width:250,icnSize:17},toggleAction:y,toggleChecked:e==null?void 0:e.addOtherOpt,open:e==null?void 0:e.addOtherOpt},q&&{disable:!(e!=null&&e.addOtherOpt)}),{isPro:!0,proProperty:"otherOption",children:p.jsxs("div",{className:a(n.placeholder),children:[p.jsxs("div",{className:a({flx:"center-between",my:5}),children:[p.jsx("span",{className:a(n.title,{w:"150px",ml:0}),children:"Option Label"}),p.jsx("input",{"data-testid":"other-opt-inp","aria-label":"Other Option Label",placeholder:"Type Option Label here...",className:a(n.input,{mt:5}),type:"text",value:e.otherOptLbl||"",onChange:w})]}),p.jsxs("div",{className:a({flx:"center-between",my:5}),children:[p.jsx("span",{children:"Required Custom Input"}),p.jsx(v,{id:"req-other-opt",className:a(R.mr2),name:"req-other-opt",action:x,isChecked:!!e.valid.otherOptReq})]}),e.valid.otherOptReq&&p.jsx(V,{id:"other-opt-stng",type:"otherOptReq",title:"Error Message",tipTitle:"By enabling this feature, user will see the error message when input is empty"}),p.jsxs("div",{className:a({flx:"center-between",my:5}),children:[p.jsx("span",{children:"Input Placeholder"}),p.jsx(v,{id:"other-inp-ph",className:a(R.mr2),name:"other-inp-ph",action:P,isChecked:!!e.otherPhShow})]}),e.otherPhShow&&p.jsx("input",{"data-testid":"othep-ph-inp","aria-label":"Placeholer for Other Input",placeholder:"Type Placeholder here...",className:a(n.input),type:"text",value:e.otherInpPh||"",onChange:S})]})}))}export{$e as default};

```
