I looked through the posts but didn't see anything related to this. Please point me in the right direction:
Is there a way to set the maximum characters users can enter in a textarea? (e.g. 1,000 character, ~200 words)
And as an aside, is there a way to search this forum?
Is there a way to set the maximum characters users can enter in a textarea? (e.g. 1,000 character, ~200 words)
And as an aside, is there a way to search this forum?
there is no built in feature, I may add it to a future update, but here is a quick snippet which you can add inside a Javascript view on your form page to do just that:
change "textarea_id" to the ID of your textarea element
document.getElementById('textarea_id').addEventListener('input', function() {
var maxLength = 1000;
var currentLength = this.value.length;
var remainingLength = maxLength - currentLength;
// Update the character count display
document.getElementById('charCount').textContent = remainingLength;
// Truncate the value if it exceeds the maximum length
if (currentLength > maxLength) {
this.value = this.value.slice(0, maxLength);
}
});
change "textarea_id" to the ID of your textarea element
Max,
For those of us who don't know what you mean by putting "javascript inside the page" a feature for max character length would be nice. It was in previous versions. And also adding a 'count down' would be equally as cool!!
Thank you for your consideration to this suggestion.
Best regards,
Donna
You need to login to be able to post a reply.