Home › Forums › Add-ons › Options Page › Copy options page to new post after selecting category › Reply To: Copy options page to new post after selecting category
There is not hook that will automatically copy they message to the category when it is selected. That would require creating a script that would detect the change and make an AJAX request. In order to get the change to the category the options page would need to be saved.
You can alter the term that the message is saved to by getting the field that selects the category and using that term ID in place of were I put the “8” in my code.
update_field('general_air_pressure', $value, 'term_'.$term_id);
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!
© 2022 Advanced Custom Fields.