Limit maximum number of characters in Topic Content TextArea
I want to limit the number of characters in the Topic Content Text Area in bbPress to a maximum limit (of say 500 characters). How can I do it?
I tried to do it by using the maxlength attribute of textarea (bbp_topic_content) in the stylesheet file, but this attribute is not working (may perhaps be because this attribute was included in HTML5 version only). However, if I use this in Developer Tools in Chrome while inspecting the text area for Topic Content, it works fine; but that is only for testing and I am not able to make a permanent change by editing the source file or through any plugin.
Third method could be to use for action or filter hook. Can you please suggest me which hook to be used and sample code, if any?
Thanks in advance.
- You must be logged in to reply to this topic.