Home › Forums › Front-end Issues › understanding acf_form › Reply To: understanding acf_form
Of course I have acf_form() !
Here is the full code of this page :
<?php acf_form_head(); ?>
<?php get_header(); ?>
</script>
<div id="content">
<div id="inner-content" class="wrap cf">
<main id="main" class="m-all t-2of3 d-5of7 cf" role="main" itemscope itemprop="mainContentOfPage" itemtype="http://schema.org/Blog">
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<article id="post-<?php the_ID(); ?>" <?php post_class( 'cf' ); ?> role="article" itemscope itemtype="http://schema.org/BlogPosting">
<header class="article-header">
<h1 class="page-title" itemprop="headline"><?php the_title(); ?></h1>
</header> <?php // end article header ?>
<section class="entry-content cf" itemprop="articleBody">
<?php
$options = array(
'field_groups' => array('group_54dcecbb2f254','group_54ddd77bb7f6b'),
'post_id' => 'new_post',
'new_post' => array(
'post_type' => 'post',
'post_status' => 'pending',
),
'submit_value' => __('Add this document', 'xxx'),
'updated_message' => __('Document added.','xxx'),
'uploader' => 'basic',
);
acf_form($options);
?>
</section>
</article>
<?php endwhile; endif; ?>
</main>
</div>
</div>
<?php get_footer(); ?>
This code works because I specify field_groups ; without this value, nothing appears but the submit button.
So, it’s totally impossible to display a group field (or, better, some fields into a group field) depending on a taxonomy field ? It’s very very awkward !
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.