Home › Forums › General Issues › Add content to ACF Field when post is created not just when saved/updated › Reply To: Add content to ACF Field when post is created not just when saved/updated
Turns out I was referencing the wrong template. My acf_form() did have the correct arguments.
I solved the problem by using field keys instead of field names and adding $post_id to the update_field function.
E.g. update_field(‘field_55760114e5887’, $per_week, $post_id);
Thanks a lot for helping me troubleshoot the problem though!
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.