I have a text custom field and would like to limit it to 15 characters. Is there a way to do this without any plugins, so whenever this field is present on any screen it only allows 15 characters.
You can try injecting javascript, but it's rare you will reliably catch all the places you might be able to edit.
I would strongly recommend getting an App for this sort of thing. Ideally one that provides a field that can be limited internally, not with js.
We have done it with Power Custom Fields Premium, creating a Regular Expression field. You can also do a post function using a validator based on Regular Expression, but that requires JSU plugin. Sorry, not the answer you wanted.
I want to do it in a native way, without using any plugins
I'm bind to do it in a native way, is it possible to inject a JS ?? then how can i do it
Thank you
There is no "native" way. You need javascript hacks (not recommended and definitely not native) or Apps.
It looks like you're new here. Sign in or register to get started.