How can I limit users from typing more than 40 characters in a field?

zabrina
Mega Expert

One issue we're having is that some users are typing the actual description in the 'short description' or 'request title' field. This information is then cut off when the form is submitted because of the 40 character limit. The field should not allow them to type more than 40 characters. Is there a way to do this? Thanks.

1 ACCEPTED SOLUTION

Deepa Srivastav
Kilo Sage

Hi ,



Click on configure variable.Goto default Value tab-->in variable attribute field add below.


max_length=40


This will solve your issue.



Please mark Helpful, Like, or Correct Answer if applicable.


View solution in original post

26 REPLIES 26

It works form me in Helsinki. I have used a wide single line text and max length is 40. Can you clear your cache by adding cache.do to your base URL. And also log out and log back in.


We have single sign on and I updated the variable attributes. Its still allowing me to put 100's of characters before it truncates it. I want it to truncate the variable while users are typing so they know they cannot type any more into the box.


It worked!! There are two variable attribute fields and I tried the other one on the top of the page. Thanks guys.



find_real_file.png


When you save this it will truncate everything after 40 characters. It will not stop from typing upto 40 characters.


-Anurag

Abhinay Erra
Giga Sage

Did you clear cache?