Support

Account

Home Forums ACF PRO Front-end forms pro or no? Reply To: Front-end forms pro or no?

  • Ok. I’m a little closer using this code. Still need to be able to create new posts (and/or custom posts?), but at least I solved one of the problems.

    <?php
          $fields = get_field_objects();
          $fieldGroup;
          
          foreach ($fields as $field) {
            $fieldGroup = $field['field_group'];
          }
          
          $options = array(
            'post_id' => 'new_post',
            // field groups has to be an array even though it's just one int...
            'field_groups' => array($fieldGroup),
            'submit_value' => 'Start a request',
          );
    
          acf_form($options);
        ?>