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.