Home › Forums › General Issues › Allow/Save Custom to an actual post type? › Reply To: Allow/Save Custom to an actual post type?
Hi there…
A potentially different way to tackle it would be to:
a) Use a Select field
b) Have an Option Page (here’s an Admin Tool to create Option Pages for ACF) with the default choices
c) Dynamically populate the select field’s choices with values from the Option Page (and sort them even)
d) Offer an ‘Other’ text box for when the choice is unavailable in the Select
e) Any time someone uses Other… add it to the default choices, add it as the value in the Select field, clear the Other field (using a ‘save’ filter)
I did this very thing for a horse race track website and it works beautifully (see attached images). The user chooses who he feels will win the races. To save him time, he chooses the horse from the drop-down (which pulls its values direct from a field in an Option Page)… but uses the “Other” text box when needed. My logic also makes sure there are no duplicates when he uses the “Other” box.
If this works for you, please mark as closed, or reach out if you need further 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.