Home › Forums › ACF PRO › has_shortcode not detected? › Reply To: has_shortcode not detected?
When you use an ACF field and get the value of the field it is already formatted and any shortcodes are already run when you get the value.
If you want to test for the shortcode in the content then you need to get the unformatted value get_field('field_name', false, false)
The 2nd parameter is the post ID, setting to false uses the current post ID and the 3rd parameter tells ACF to not format the value.
Another option would be to test the formatted content to see if it contains a form.
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.