ChronoForms8 - Set max character count in text area.

markenns 02 Feb, 2024
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?
Max_admin 11 Feb, 2024
Answer

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: 

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, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
markenns 13 Feb, 2024
1 Likes
Thank you for that. I'll give it a try.
pgrnycomdir 17 Jun, 2025

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

Max_admin 25d ago

Hi Donna

Added to v8.0.50

Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
pgrnycomdir 20d ago

Max,

I upgraded to the latest version and still do not see where the setting is for maximum characters for a text area.

Thank you,

Donna

Max_admin 16d ago

Hi Donna

it's in the v8.0.50 update which has just been published now.

Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
pgrnycomdir 16d ago

Max,

I had done the update but it didn't work.  My version is still the old version.  

Things are moving faster than I can keep up with.  I'm still on Joomla 4.x and PHP 8.13.  

Should I reinstall Chronoforms version 8???

I don't know why it is not giving me the update in my website.

Best regards,

Donna

Max_admin 15d ago
1 Likes

Hi Donna

Just download the new file and install it OVER yours, do not uninstall

Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
pgrnycomdir 15d ago
1 Likes

I love it!!  Works great!!

Thank you so much Max!

Donna

Max_admin 15d ago

You are welcome! 😊

Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
You need to login to be able to post a reply.