I’m trying to understand how to prevent the post object field to autopopulate itself with the last selected value.
Setting the ‘allow null’ to yes display the ‘x’ so that the preselected choice can be manually removed, however I’d prefer to display nothing at all (or just the normal ‘Select’ option value)! simply because I am pre-filtering the values to display in that post object field according to current_user in my functions.php file (i.e. authors can only select their own published posts) which is working fine, but in the front-end the post object is pre-filled with the last selected post and users are still able to select that option even if it’s not their post.
I’ve got a very limited knowledge of jQuery so I’m still trying to work out how to select that element and I’m wondering if there is an alternative?
How is ACF outputting that value and how else could I control it?
I’ve also tried to set autocomplete to off in the act form 'form_attributes' => array('autocomplete' => 'off')
(tried with both ‘off’ and ‘false’ as this was also suggested somewhere in the forum) but it’s not working.
I’m a newbie and possibly trying to bite off more than I can chew…
Thanks to whoever can help!
Viewing 1 post (of 1 total)
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