The CreatorCon Call for Content is officially open! Get started here.

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

stevesmith
Giga Sage

There was a PRB on this not too long ago, or at least around the max_length attribute not being respected. I'll try to find it but am not having luck today.



I'm actually experiencing a similar issue on Helsinki Patch 3 (Prod) and Patch 5 (Test), but it's on the Default incident form not variables. You can type more than 40 characters, but when you update/save the record only 40 are retained. I think it's a bug as this did not use to be a problem.


It worked when I entered the max_length on the top variable attribute field. I cleared my cache first if that helps! Then again, users shouldn't be entering more than a few words into the title field anyway. This is just to limit them.