Home › Forums › Front-end Issues › Don't understand 'field_groups'
I read Documentation about “Using acf_form to create a new post”. I placed that code within my themes functions.php file. I make template with following code:
<?php
$args = array(
‘post_id’ => ‘new’,
‘field_groups’ => array( 123 ),
‘submit_value’ => ‘Make new thing!’
);
acf_form( $args );
also use acf_form_head(); get_header(); the_post();
I make fields group, named “New Post”, with fields “Post Title”,”Post Body”.
Template page only show submit button ‘Make new thing!’
I don’t understand ‘field_groups’, What should write within array( ). Or where i found field_groups id like 123 or 387 ?
I am a beginner, for solve i try a lot, please help me.

What is it you would like to achieve shatilarefin? Give me a real world example and I will see what I can do to explain.
I need a frontend post, where user can add post in frontend. Website link is http://tolett.com/?page_id=5 .

Is there a reason you want to have people add posts from the front-end? Seems a little dangerous.
This plugin does what you want to do but also allows you to control what is published at the end of the day.
http://wordpress.org/plugins/frontend-uploader/

When you edit a field group, take note of the post_id parameter in the URL. This is the field group ID and you can use it in the $args array of acf_form.
Thanks
E
The topic ‘Don't understand 'field_groups'’ is closed to new replies.
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.