Support

Account

Home Forums Front-end Issues Front end form not rendering for custom post type

Solved

Front end form not rendering for custom post type

  • I am attempting to create a front-end form for a custom post type.

    Currently I have the following code, but all that renders on the screen is the ‘Submit Club’ button. When looking at the HTML there is a hidden WYSIWIG editor. There are no errors in the console or in the logs (I have no idea where else to start looking to provide better information)

    If I remove the 'post_id' => 'new_post' section the custom fields for a page return. However, I need the custom fields for the ‘club’ post type.

    If I also toggle post_content to true, not content or editor appears. The post_title also never appears.

    <?php
            $options = array(
                'post_id'		=> 'new_post',
                'post_title'	=> true,
                'post_content'	=> false,
                'new_post'		=> array(
                    'post_type'		=> 'club',
                    'post_status'	=> 'publish'
                ),
                'submit_value'	=> 'Submit Club',
                'uploader'      => 'basic',
                'honeypot'      => true,
                'updated_message' => __("Thanks for your submission"),
            );
    	
    	acf_form($options);
    	?>
  • So this was a version problem. Upgraded to v5 and all worked well. (I didn’t notice the version number in the documentation screens, once I found that I was away)

Viewing 2 posts - 1 through 2 (of 2 total)

The topic ‘Front end form not rendering for custom post type’ is closed to new replies.