I recently upgraded to ACF Pro. Loving it overall. Great work Elliot!
I noticed that the Text field no longer seems to have a “Formatting” option. Previous versions of ACF gave us the option to “Convert HTML into tags” or select “No formatting” for Text fields. This was a valuable feature IMO and I’m wondering why it’s been removed.
Also, the “Formatting” option for Text Area fields appears to have been replaced with the “New Lines” option. We can now select “Automatically add paragraphs” (sweet option!), “Automatically add <br>” (similar to before), and of course “No formatting”. However, “Convert HTML into tags” is now gone as well.
Am I missing something or have useful features been removed?
Thanks.
ACF email support says:
“The feature exists. If you write any HTML in the Text or TextArea field, it renders as HTML in the frontend.”
Ah, yes…it does. It appears that this feature is now baked in rather than being a selectable option.
Hi both of you.
In relation, I am interested in the opposite, that is to prevent the textarea to contain HTML. That is even if a user inputs HTML, it will be filtered out for use in the template front-end file. The “No formatting” option does not do that.
Is there an option I missed for that or should I filter the field output through PHP?
Thanks twice. Of course for that lovely huge plugin too. 🙂
I would like the ability to output the textarea content unformatted as available in the non-pro version. Disappointing that this option was taken away.
The reason is, I’d like to be able to use code blocks using ACF but have them unformatted and appear as code not formatted html.
Is there a way to do this with ACF or a workaround in the meantime?
Is there a workaround for this yet?
Removing the option was a bad move, preselecting the “Convert into HTML” and allowing a choice for no formatting (along with the br/p options) would have been much more sensible.
We have clients entering raw HTML into textareas and there seems to be no way of preventing this, unless I’ve missed something?
Thanks
You could use the sanitize_text_field function.
https://codex.wordpress.org/Function_Reference/sanitize_text_field
echo sanitize_text_field( get_field( 'acf_textfield' ) );
The topic ‘ACF Pro: Text/Text Area fields formatting option?’ is closed to new replies.
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.