Forums

need to set finite number of characters

m4smariaoni 02 Jun, 2014
Hello,

Please i would like to know how to set a finite number on the input for both text and textarea.

e.g names should not be more than 50 characters input.

This was the mail our client sent to us because of their forms which we used chronoform.

We observed that the Name, email & phone number fields can accept alphabetical, numeric and symbolic characters. In the same vein, the fields accept infinite number of characters. Issues resulting from incorrect input validation could lead to all sorts of problems and vulnerabilities. Here is a listing of some of vulnerabilities that could be solved just by validating input.
• buffer overflows
• injection attacks
• DoS attacks
• memory leakage
• information disclosure
• compromised systems
This list is definitely not all inclusive. There are all sorts of other types of vulnerabilities that would be solved by input validation.

m4smariaoni 02 Jun, 2014
Thanks Bob,

However, how i can set a limit on character input for both inputbox and text area.

Let say for names, i want the maximum characters input to be 20.

Thanks
GreyHead 02 Jun, 2014
Answer
Hi m4smariaoni,

For an input box you can set the Field Max Length in the Element settings.

For a text area you'd need to use Custom Serverside validation to check the length of the submitted text. (There is a FAQ on setting limits on the size using JavaScript but that will not work as a user helper, not for site protection as it can be avoided by turning JavaScript off.)

Bob
This topic is locked and no more replies can be posted.