title: ACF front end form to create term
body: <p>I want to use ACF frontend form function to create a form with custom fields that is used to create a taxonomy term, in this case a group. I have seen how to implement this with a post and have done so throughout the site but i am unable to implement this to insert a new term. I think i am on the right track but still am having issues with it not adding terms</p>
  
  <pre><code>        function my_pre_save_post( $post_id )
              {
                  // check if this is to be a new post
                  if( $post_id != 'new' )
                  {
                      return $post_id;
                  }
  
                  // Create a new group
  
                  // insert the group
                  $post_id = wp_insert_term(
                    $_POST['acf[_post_title]'], // the term
                    'groups', // the taxonomy
                    array(
                      'description'=&gt; $_POST['acf[_post_content]'],
                    )
                  );
  
                  // update $_POST['return']
                  $_POST['return'] = add_query_arg( array('post_id' =&gt; $post_id), $_POST['return'] );
  
                  // return the new ID
                  return $post_id;
              }
  
              add_filter('acf/pre_save_post' , 'my_pre_save_post' );
          $args = array(
              'post_id' =&gt; 'new',
              'field_groups' =&gt; array( 6055 ),
              'post_title' =&gt; true,
              'post_content' =&gt; true,
          );
          acf_form($args);
  </code></pre>