Home › Forums › Bug Reports › add_filter(acf/update_value, wp_kses_post) in acf_form() breaks select fields › Reply To: add_filter(acf/update_value, wp_kses_post) in acf_form() breaks select fields
ACF stores some values, like multi-select and checkbox fields as well as some others as serialized arrays. Running wp_kses_post on these values after ACF has serialized them removes the formatting needed to unserialize them. Running it on arrays before they have been serialized converts them to a strings.
If you want to run this on these types of fields you’d need to run it on each element of the array rather than the array itself before itis serialized. You’ll probably need to create a specific filter to do it.
If you want to run this on text, textarea and other fields that allow arbitrary input you should target these fields with the field type involved
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!
© 2022 Advanced Custom Fields.