Support

Account

Home Forums Add-ons Options Page Reset to default and Save button

Solved

Reset to default and Save button

  • Hi.
    Is it possible to add “reset to default and save” button on the options page?
    And how can I do that?
    Sorry, if not in the topic.
    Thank you for the great plugin=)

  • Hi @belyj-vladmir

    I believe it’s possible, but you need to create a custom code to handle the action.

    What I suggest you is to create a select or radio field instead to specify if you want to reset the data. After that, you can check it by using the acf/save_post hook. If the field is selected, then you can use the update_field() function and delete all of the related fields for the current option page.

    I hope this makes sense 🙂

  • James, thank you. Your suggestion was very useful.

Viewing 3 posts - 1 through 3 (of 3 total)

The topic ‘Reset to default and Save button’ is closed to new replies.