# bit-form/V3.0.2/assets/initTextLengthHelper.min.js

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

- Page: https://pluginprobe.com/plugins/bit-form/V3.0.2/code/assets/initTextLengthHelper.min.js
- Raw: https://pluginprobe.com/plugins/bit-form/V3.0.2/raw/assets/initTextLengthHelper.min.js
- Modified: 2026-05-22T07:18:18+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/V3.0.2/code/assets/initTextLengthHelper.min.js#L10-L20`.

```javascript
var initTextLengthHelper=function(){"use strict";return function(e=null,l=""){(e?[e]:Object.keys(bf_globals)).forEach((e=>{const t=bfSelect(`#form-${e}`),{fields:r}=bf_globals[e];Object.keys(r).filter((e=>r[e].valid?.minlength||r[e].valid?.maxlength||r[e].valid?.maxword||r[e].valid?.minword)).forEach((i=>{if("undefined"!=typeof checkRepeatedField&&checkRepeatedField(i,bf_globals[e])&&!l)return;const n=r[i],a=`${l}.${i}-fld-wrp`,d=`${a} input, ${a} textarea`,c=`${a} .${i}-hlp-txt`,f=e=>{const l=t.querySelector(c);if(!l||!n.helperTxt)return;const r=e.value||"",i=r.length,a=r.trim()?r.trim().split(/\s+/).length:0;let d=n.helperTxt;d=d.replace(/\${field\.minlength}/g,n.valid?.minlength||""),d=d.replace(/\${field\.maxlength}/g,n.valid?.maxlength||""),d=d.replace(/\${field\.maxword}/g,n.valid?.maxword||""),d=d.replace(/\${field\.minword}/g,n.valid?.minword||""),d=d.replace(/\${field\.value_length}/g,i),d=d.replace(/\${field\.value_wordlength}/g,a),l.innerHTML=d};t.querySelectorAll(d).forEach((e=>{e.addEventListener("input",(e=>f(e.target))),f(e)}))}))}))}}();

```
