Home › Forums › ACF PRO › Front-end forms pro or no? › Reply To: Front-end forms pro or no?
hi @James,
Thanks very much. I can’t believe I did this, but the group I’m working with is using v4 and I was looking at the v5 docs.
Can you clarify a point for me? In the v4 article of the link you posted and in v4 for acf_form()
, there’s an option for field_groups
. It should be an array, but I’m not clear on what it’s an array of. Is there a place to find an id for the group?
Similarly, in the same post, where the code is `function my_pre_save_post($post_id) {
if ($post_id !== ‘new_post’) {
return $post_id;
}
$title = $_POST[‘fields’][‘field_123456’];
$post = array(
‘post_status’ => ‘draft’,
‘post_type’ => ‘post’,
‘post_title’ => $title
);
$post_id = wp_insert_post($post);
return $post_id;
}
add_filter(‘acf/pre_save_post’, ‘my_pre_save_post’);`
Where do I get the ‘field_1234556` value from?
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.