I am trying to display a form on the front end. It seems one can do that, as specified here: http://www.advancedcustomfields.com/resources/acf_form/
I have the field group all set up to display for post type = 'byc_cure'. The form is displaying on the back end. Here is the code by which I am attempting to display the form on the front end:
<?php acf_form_head(); ?>
<?php get_header(); ?>
<div id="primary" class="content-area">
<div id="content" class="site-content" role="main">
<?php /* The loop */ ?>
<?php while ( have_posts() ) : the_post(); ?>
<?php acf_form(array(
'post_id' => 'new_post',
'new_post' => array(
'post_type' => 'byc_cure',
'post_status' => 'publish'
),
'submit_value' => 'Publish'
)); ?>
<?php endwhile; ?>
</div><!-- #content -->
</div><!-- #primary -->
I put this code in a page template and made a page that uses this template.However, when I click a link that takes me to this page, the form does not display. The only thing that displays is a 'Publish' button.
Will it make a difference if I put it in the single-byc_cure.php file? Or, do I need to specify that this form should come up when page = page.php. When I tried that however, an update button displays (just like on the back end). How do I modify the code so that the form displays, I can customize the text on the submit button and ACF knows that when the form is submitted it should create a new post of type 'byc_cure'?
Thanks in advance