In This Section

redcap [at]
Related Topics

Action Tag Spotlight: Word & Character Limits

Published on January 23, 2023 · Last Updated 1 month 2 weeks ago


Subscribe to be notified of changes or updates to this page.

Word and character limits can be incredibly useful and add an extra layer of control over your data in REDCap. Perhaps your project contains an essay prompt that has a word limit, or you want text responses to be within a certain number of characters. Both situations are easy to enforce in REDCap using the @WORDLIMIT and @CHARLIMIT action tags.


Suppose that I want survey respondents to write a summary about their experience working with REDCap with a limit of 150 words. I could just write “Word Limit: 150” in the field label or field note and trust that respondents will adhere to the limit on their own. But respondents may deviate from this limit accidentally, or they may not even notice the limit at all!

Using @WORDLIMIT, I can set the limit equal to 150 in the Action Tags/Field Annotation box.

Now, REDCap will enforce a word limit on responses, so survey respondents cannot go over the limit. In addition, REDCap will display the number of words remaining on the bottom of the field.


Using @CHARLIMIT to enforce a limit on individual characters is just as easy as implementing @WORDLIMIT in your project. Set @CHARLIMIT equal to the maximum number of characters you want in responses. REDCap will enforce this limit and display the number of characters remaining to survey respondents.

Note that you cannot use both the @WORDLIMIT and @CHARLIMIT action tags at the same time, so you will want to pick one or the other when designing your field.

In addition, both the @WORDLIMIT and @CHARLIMIT action tags will not be enforced on API imports. If you are planning to use REDCap’s API to import data into these fields, you will want to enforce these limits outside of REDCap before importing.

Bonus Tip: Use the @CHARLIMIT action tag in conjunction with the @PASSWORDMASK action tag to create a password-like field in your survey.