Home › Forums › Front-end Issues › Shortcodes in text field › Reply To: Shortcodes in text field
Just because the documentation applies it to all textarea fields does not mean you must. Format value can also be used on just specific fields by including the field name or the field key in the filter name. You must remember that the examples are just that, examples, using the most simple form of the filter to get the point across.
While you can do it in the code when you get the field using the filter allows you to do it once instead of at every instance where the field is used. It also allows you to easily alter the field long after the fact so that you don’t need to find every location where it is used in your theme and alter the code in every location.
Here’s my take on security in this case. If the person that is doing the editing has access to the content editor and therefore are able to add shortcodes to the content then there is no extra security risk by allowing them to put shortcodes into text and textarea fields.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.