Support

Account

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