Hi, I have a frontend form that I am using for users to submit posts using acf_form. It has been working fine but after updating to the latest version my form fields don’t show anymore. Below is the warning I’m getting
Warning: Invalid argument supplied for foreach() in /site_path/wp-content/plugins/advanced-custom-fields-pro/includes/forms/form-front.php on line 536
Im supplying the field groups ID as shown below. All ACF fields are not showing on the form.
'post_id' => 'new_post',
'field_groups' => 7955, // Used ID of the field groups here.
'post_title' => true, // This will show the title filed
'post_content' => true, // This will show the content field
'form' => true,
'new_post' => array(
'post_type' => 'auto_team',
'post_status' => 'publish' // You may use other post statuses like draft, private etc.
'return' => '%post_url%',
'submit_value' => 'Submit Staff',
'field_groups' => array(7955), // Used ID of the field groups here.
There may have been code previously to convert non-array values to arrays, but I don’t know. If this was the case the developer probably removed it since the documentation clearly calls for an array here.
Page Builder Summit Sponsors! BIG thanks to these people who’ve sponsored the Page Builder Summit: Akshat Choudhary from WP Remote @wpremote Elliot Condon from ACF @wp_acf Dimitrie Baitanciuc from Brizy @themefuse Dennis Dornon from MainWP @mymainwp