I’ve just checked your site and it seems the front end form doesn’t load the proper data. Could you please try to set one of the custom post type ID to the form’s
post_id option like the following?
acf_form(array( 'post_id' => '99', 'submit_value' => $submit_button, 'updated_message' => $updated_message ));
Where ’99’ is the custom post ID. If it shows the correct data, then there’s something wrong with how you get the post ID.
WordPress shortcode needs you to return the string you want to show on the front end. But because
acf_form() doesn’t return anything (it just prints the form immediately), you can’t return it. This is where output buffering is used. Instead of printing the form right away, by using
ob_get_contents() you can put the string (the form) in a variable first and then later return it from the shortcode. If you don’t know how this works, kindly visit PHP community.
Also, could you please upload the files that have long content instead of copying it to your reply? Because copying it makes the thread hard to read.
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!
ACF PRO’s Flexible Content field allows you to create smaller pieces of UI and compose them into whole flexible patterns. In our latest article, we show how to use it to create swappable site sections and integrate it all in a theme.https://t.co/ZRocH8oJSp— Advanced Custom Fields (@wp_acf) January 24, 2023
© 2023 Advanced Custom Fields.