Tell us what you are trying to do?
- I would like to show people how much text they have entered in to a CRED WYSIWYG text field, so they will be able to keep content within the word limit stated by my client
Any solution for either showing the word count OR imposing a word limit on the field would be great.
Thanks!
We have a request filed for Types, which also would affect CRED later on, where a Field with count would be provided, mainly with the goal to limit the amount of characters or words.
This could also be used for your goal, and I added your voice there.
Now, for your specific goal there is no solution within WordPress without custom code or 3rd party software.
Toolset does not include any count of data either yet.
You would need to use Custom JS right now, or Custom PHP validation on submit (not really what you want)
Here are a few examples:
hidden link
hidden link
https://wordpress.org/support/topic/how-to-display-wp-editor-word-count/#post-7538501
On PHP validation, you can hook your code to the CRED API:
https://toolset.com/documentation/programmer-reference/cred-api/#cred_save_data
For JS, you can add it directly to the CRED Form Edit area for JS below the main content.
Thank you. For the benefit of others, I used this solution.
https://wordpress.org/support/topic/how-to-display-wp-editor-word-count/#post-7538501
It's not very clear, but it does work if you make your own WordPress plugin containing the PHP sample code supplied, and the relevant TinyMCE plugin referenced (that's why the thread is a bit muddled, because there are two different plugins being talked about!)