Exclude fields from acf front end page editor

I’m trying to create a form for editing a page using ACF like this:

acf_form(array(
    'post_id'   => $post_id,
    'post_title'    => false,
    'submit_value'  => 'Submit changes'
));

This gives me a form with all the fields from this post. I don’t want all of them to be displayed in the form and so wanna exclude them. Is this possible? And if so, how would I go about doing this?

Related posts

1 comment

  1. There is no option for exclude fields but you can use “field_groups” to include fields.

    for ex.
    Check your field group URL. It looks like: ../wp-admin/post.php?post=21&action=edit

    ’21’ is you field group.

    So change your code to:

    acf_form(array(
        'post_id'   => $post_id,
        'post_title'    => false,
        'field_groups' => array(21),
        'submit_value'  => 'Submit changes'
    ));
    

    for more info http://www.advancedcustomfields.com/resources/acf_form/

    Good luck!!!

Comments are closed.