Home › Forums › General Issues › acf/save_post question › Reply To: acf/save_post question
why dont you use a repeater in each CPT called something like ‘relational meta’ and acf update_field.
you can use wp noonce ajax to take data from the first CPT, pass it to your function (in functions.php) with ajax check if the second CPT exists, then check if the second CPT has the data you want to save, if not, save it. This is also benifical as you can detach your logic from wp concerning post meta and use ACF as your conduit.
an added bonus is this is all done without reloading the page.
this would be a mix of wp, acf, js and ajax. Ping if you require further assistance.
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.