I’m setting up a client site and need to limit the number of characters they can input in a wysiwyg editor that is in a repeater field.
I found this link:
https://support.advancedcustomfields.com/forums/topic/set-max-length-for-editor/
But it’s not very helpful. I can’t figure out how to make it work. I’m not sure if it works with a repeater field. The only thing that should change is the name=something? It’s also a little dated. Is there a newer solution?
You might want to check out this fork of one of my plugins https://github.com/puntonero/acf-input-counter. This person has added a limit on the wysywig field in ACF5. Not sure what version of ACF you are using and I can’t say that I’ve seen anything for ACF4 that will limit wysiwyg length.
Hey @hube2 I have a similar need but I only want to limit the character length when using an acf_form
on the front end. Is it possible with the plug-in to set the character limit dynamically from a hook/filter?
Someone has created a fork of my plugin that does wysiwyg fields here https://github.com/puntonero/acf-input-counter. I have not incorporated it into my because I fell it is outside the scope of what I set out to do.
Sorry, missed the point of your questions. You would need to set up an acf/load_field filter. In the filter check if (is_admin()) { return $field }
. Then you can set the correct field setting to limit the characters. I don’t know what that setting is, you’d need to look at the plugin I linked to and/or ask the developer.