Home › Forums › Backend Issues (wp-admin) › jQuery Auto Populate › Reply To: jQuery Auto Populate
Hi @bobz
I think the issue is that because on page load, the select field does not contain any value because it has no option element to select.
This means, your JS can’t find the origional value to select when you update the DOM with new option elements.
Perhaps in your PHP AJA function, you can lookup the value for the field, and include this ‘selected’ data for the option you want selected.
To do this, you will need to change the way you post pack your data as a comma separated string wont allow for this kind of data.
Try using JSON to return an array of items, plus the selected value if it has one!
Does that help?
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.