Build A Custom Post Form (Create Type)
Written by the Divi Engine Documentation Team
Follow these steps to learn how to build a custom post create form.
Step 1: Create Custom Post Type and ACF Fields
In the example below, the custom post type is called Recruitment Profiles (this is for a recruitment website) and there are five ACF fields that will make up each applicant's post. This form will enable a user to create a post containing these five pieces of data.
Step 2: Add The Form Module
Start off by adding the Form Module to the page of your choice.
Step 3: Define Content Main Options
Edit the main options by adding a Title and ID. Then select your custom post type as the Form Type (in my example below this is a recruitment profile custom post). Customize the submit button and set whether you would like the custom posts to save to draft, publish or other.
Step 4: Define Content Notices Options
Please click HERE for information on Form Notices.
Step 5: Define Content Redirects Options
Please click HERE for information on Redirects.
Step 6: Define Content Extra Options
Please click HERE for information on our Extra Features.
Step 7: Define Spam Protection Options
Please click HERE for information on Spam Protection.
After completing the main settings of the content tab, you will need to add and customize form fields that relate to your custom post type so that users can upload data for the post. For example, if you have created an ACF field for an employee's first name, then you will need to add a Field Title called, "First Name" with ID "First_Name" and the Type and Input Field (short amount of characters).
Step 8: Define Field Options
Give your form field a Title, ID, type of field, etc. Please click HERE for more information on field types.
Step 9: Define Field Layout Options
Please click HERE for information on Field Layout Options.
Step 10: Define Mapping Options
Mapping options are only for Create Type forms. These are forms that are used to create custom posts, pages, posts, login and registration forms. Since you are building a custom post type form, you will need to select map the data correctly. To do this, select the Field Mapping Type and then the field. In the example below you can see that the input field will map to the ACF field for the Recruitment Profiles custom post type called Full Name that was created in ACF. Click HERE for more information on Field Mapping.
Step 11: Define Field Conditional Logic
Please click HERE for information on Conditional Logic.
Step 12: Add Post Title Field
Please make sure that you add an input field that maps to Post Title. This is because Divi Form Builder will only create a custom post if there is a title.
View your new custom post type form from the front end and remember to use the Design tab for extra style.
Please email us at [email protected] if you are unable to get Divi Form Builder working.