Home › Forums › Backend Issues (wp-admin) › Button field with lots of options › Reply To: Button field with lots of options
Sorry, I guess I didn’t quite understand. So you want to create a new field type that makes use of an existing field type but just add additional options.
I could be wrong, but I think that what you’re really looking to do is “extend” one of the existing fields.
Instead of this at the top of the new field class acf_field_FIELD_NAME extends acf_field
you could extend the page link field
class acf_field_FIELD_NAME extends acf_field_page_link
Then I think you would only need to write new functions to replace parts of the page link field, like
render_field
render_field_settings
format_value
update_value
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.