Home › Forums › ACF PRO › Relationship – Add selected to the top › Reply To: Relationship – Add selected to the top
There’s really no simple way of doing this. In the ACF core javascript, the new element is appended to the list, and I don’t really see a way of hooking into that easily. If this is a client’s request, the short answer is no. The long answer is yes, but it’ll cost them some $$$.
Basically you’d need to hijack what is natively done and things can get sticky from there. Or…. you can jump into the ACF core javascript files and change this: this.$list('values').append( html )
to this.$list('values').prepend( html )
. But of course, that’ll only last until they update ACF, which is horrible idea.
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.