You may have gone beyond my ability to help you. ACF form does not really have the ability to do multi-step form submissions, that I know of. There have been some topics here about them, but I don’t know if those people ever found a solution.
In the new post process it sounds like you won’t know what the new post ID will eventually be until the first part of the form is submitted in WPJM. You may be able to work around this by creating you own pre_save_post filter https://www.advancedcustomfields.com/resources/acf-pre_save_post/ but even here, I’m not sure how you’d do this if WPJM does not assign the post ID until after the first part of the form is submitted. The pre_save_post filter fires before anything is saved, however, WPJM must be using a similar mechanism and the order could be completely dependent on the order that the plugins are loaded, depending on how they do it. When a post on the front end is submitted, ACF looks at $_POST[‘acf’] to see if it contains anything. If it does then it saves the values. This is done at the top of your template output before WP starts outputting the filter. If WPJM has saved the draft post before this happens then you should be able to get the post ID that was saved in a pre_save_post filter and return that post ID for ACF to use.
For the editing process, you will need to figure out how to get the actual post ID of the WPJM post that is actually being edited instead of the current page ID. Of the two I think that this might be the easier to accomplish. But like I said, I don’t know anything about WPJM.
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.