Found an interesting bug tonight when working with ACF PRO 5.0.5, was wondering if anyone else saw the same problem.
I have added fields to the Categories Taxonomy page, some of which are required and some of which have acf/validation hooks. If errors are generated they are not cleared once the submission has been successfully submitted. Most fields are cleared with the exception of image and image gallery. The image(s) also remain after a successful submission.
Thanks for the bug report. I can confirm that this has been fixed in the upcoming update 5.0.6
Not sure if this is on you, but you might want to consider rewinding to the top of the page on submit (again this is limited to both the Category create and edit pages). Users report that they click on “Update” and “Add New Category” and do not realize there are errors at the top of the page. They end up clicking over and over again!
Thought I’d let you know,
Thanks mate. I’ll definitely consider adding it in
My timing is a wee bit off. I was going to add one additional note but looks like you got to my initial response first.
I added “.acf-field[data-required=”1″] .add-attachment” to your remove_error list on line 5786 of input.js, so if user’s click on “Add to Gallery”, the error is removed. I also considered moving the red box from the “select” to the container holding both the “blue button” and “select” but I’ll have to come back to that.
I did try to add my own scroll to top for the submit but I didn’t realize that you had stopped propagation of the click. I noticed you had some “action handlers” for third party support. I gather it’s possible to hook into these for the ajax level submit and do the scroll to top. Do you have any support pages that describe how to do this?
While I have your attention, be aware that when I get_field for taxonomy related fields, I can’t do get_field(‘field_name’, $term[‘term_id’]). I must do get_field(‘field_name’, ‘category_’ . $term[‘term_id’]).
Thanks for listening,
You must be logged in to reply to this topic.
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!
🤔 Curious about the ACF user experience? So are we! Help guide the evolution of ACF by taking part in our first ever Annual Survey and guarantee you’re represented in the results. https://t.co/0cgr9ZFOJ5— Advanced Custom Fields (@wp_acf) May 8, 2023
© 2023 Advanced Custom Fields.