Setting Password Length Field less...

User 397890 Photo


Registered User
4 posts

FYI:
I needed to add a password field to my form that allowed passwords with less than 5 characters for an internal site that used pin codes. However, WFB does not allow less than 5 characters when building a form.

I tried support but since this was a coding issue, they could not help me. So I dug into it and found what you needed to adjust in order to set the minimum character length to less than 5. (it is only necessary to adjust code for less than 5. if you want 5 or more you can do that in the field properties when building the form).

Note: You need to adjust the code after you publish (or export) the form. If you make any changes and republish the form, you will need to re-adjust the code.

There are two files that you need to adjust these are in the folder with your forms html file:
form.cfg.php
validation_data.js


In the form.cfg.php file. Scroll to the bottom of the file and find the line that begins with "rules". Scroll across until you see your password field settings and adjust the "minlength" to what you need it to be (eg. "minlength":3).

In the validation_data.js file. Do the same thing. find your password field settings and adjust the "minlength"

Save both and away you go :)
User 2088758 Photo


Senior Advisor
3,121 posts
Online Now

Thanks Tony for the tip.
Taking over the world one website at a time!

Steve Kolish
www.misterwebguy.com

YouTube Channel:
https://www.youtube.com/channel/UCL8qVv … ttneYaMSJA

Have something to add? We’d love to hear it!
You must have an account to participate. Please Sign In Here, then join the conversation.