Title: Creating custom post type while submitting form
Last modified: September 1, 2016

---

# Creating custom post type while submitting form

 *  [msbsally](https://wordpress.org/support/users/msbsally/)
 * (@msbsally)
 * [9 years, 11 months ago](https://wordpress.org/support/topic/creating-custom-post-type-while-submitting-form/)
 * _[ Moderator note: [moved to How-to and Troubleshooting](https://wordpress.org/support/topic/wheres-my-topic-gone?replies=1&view=all).]_
 * Hi,
    I need to view my form data (employee details like name, address, phone 
   number, email, experience and reume) in my post. is it possible to create post
   type while submitting my form??
 * I searched but I did not get what I want. Any help regard this will be helpful
   for me.
 * Thanks Sallu.

Viewing 7 replies - 1 through 7 (of 7 total)

 *  [Bob Cristello](https://wordpress.org/support/users/gntmidnight/)
 * (@gntmidnight)
 * [9 years, 11 months ago](https://wordpress.org/support/topic/creating-custom-post-type-while-submitting-form/#post-7464932)
 * If you are using Gravity Forms you can get this plugin that works quite effectively.
 * [https://wordpress.org/plugins/gravity-forms-custom-post-types/](https://wordpress.org/plugins/gravity-forms-custom-post-types/)
 *  Thread Starter [msbsally](https://wordpress.org/support/users/msbsally/)
 * (@msbsally)
 * [9 years, 11 months ago](https://wordpress.org/support/topic/creating-custom-post-type-while-submitting-form/#post-7465089)
 * [@bob](https://wordpress.org/support/users/bob/) Cristello
 * I am not using any plugins to create my form.
    I created it by my own and did
   ajax validation too. I just need to insert the form details in a custom post 
   rather than in the mysql table. While Clicking the post from the site(backend),
   I need to show the details which are inserted through form. Any help will be 
   helpful to me.
 * Thanks Sallu
 *  [Bob Cristello](https://wordpress.org/support/users/gntmidnight/)
 * (@gntmidnight)
 * [9 years, 11 months ago](https://wordpress.org/support/topic/creating-custom-post-type-while-submitting-form/#post-7465100)
 * You are going to have to create your own code to accomplish that. Everything 
   you need to know about inserting posts is here:
 * [https://developer.wordpress.org/reference/functions/wp_insert_post/](https://developer.wordpress.org/reference/functions/wp_insert_post/)
 *  Thread Starter [msbsally](https://wordpress.org/support/users/msbsally/)
 * (@msbsally)
 * [9 years, 11 months ago](https://wordpress.org/support/topic/creating-custom-post-type-while-submitting-form/#post-7465107)
 * I have make use of it. it is not create any new custom post nor inserted the 
   form values in the custom post which i created. Instead it added the form data’s
   in “wp_posts”.
 * This is the code which i used,
 *     ```
       $title= $_POST['your_name'];
        $decription=$_POST['e_mail'];
       $my_post = array(
         'post_title'    => wp_strip_all_tags( $title ),
         'post_content'  => $decription,
         'post_status'   => 'publish',
         'post type'     => 'EmpResume'
         //'post_author'   => 1,
         //'post_category' => array( 8,39 )
       );
   
       // Insert the post into the database
       wp_insert_post( $my_post );
       ```
   
 * Any other idea?
 * Thanks Sallu.
 *  Thread Starter [msbsally](https://wordpress.org/support/users/msbsally/)
 * (@msbsally)
 * [9 years, 11 months ago](https://wordpress.org/support/topic/creating-custom-post-type-while-submitting-form/#post-7465110)
 * Hi Guys,
    I am not getting enough information on creating custom post type while
   submitting form so moved to create “custom admin page” to view my form data from
   mysql db. I viewed the employee names in wp site. Now trying to view the page
   with detail when clicked the employee name.
 * If I have finished it I’ll Post my answer .
    Thanks Sallu.
 *  [esmi](https://wordpress.org/support/users/esmi/)
 * (@esmi)
 * [9 years, 11 months ago](https://wordpress.org/support/topic/creating-custom-post-type-while-submitting-form/#post-7465111)
 * Try asking these kinds of questions in the Hacks forum: [https://wordpress.org/support/forum/hacks](https://wordpress.org/support/forum/hacks)
 *  Thread Starter [msbsally](https://wordpress.org/support/users/msbsally/)
 * (@msbsally)
 * [9 years, 11 months ago](https://wordpress.org/support/topic/creating-custom-post-type-while-submitting-form/#post-7465113)
 * Okay esmi:)

Viewing 7 replies - 1 through 7 (of 7 total)

The topic ‘Creating custom post type while submitting form’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 7 replies
 * 3 participants
 * Last reply from: [msbsally](https://wordpress.org/support/users/msbsally/)
 * Last activity: [9 years, 11 months ago](https://wordpress.org/support/topic/creating-custom-post-type-while-submitting-form/#post-7465113)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
