Skip to main content
How to set a character limit on the field's input?

I need to set a limit for my users so they can't cross a certain number of characters.

Updated over 9 months ago

You can find the character limit option only in single-line text and long text fields (without rich text). To enable it in the form:

  • Select a "Single Text Field" or "Long Text".

  • Advanced settings.

  • Character Limit

💡This option doesn't appear if a field is a long text with rich-text enabled.

Hide character limit in fields

You might wanna hide the characters remaining. Especially if you want to limit very long submissions, but not have users feel like this is some kind of ‘target’ count.

image

In this case, you could simply use Regex field validation instead of the built-in character count function. Here’s how to set it up:

Screenshot 2024-02-09 at 2.07.49 PM

^.{1,10}$

This regex for example will match any string that has at least 1 character and no more than 9 characters, effectively allowing inputs that are less than 10 characters long. You can ask ChatGPT to come up with other patterns to change it to any limit you like.

Here’s how the form looks to the end user:

Screenshot 2024-02-09 at 2.08.17 PM

The error message will only show up when the user goes above the limit.

Related

Did this answer your question?