In this tutorial, you will learn how to create a custom form template in WP Forms. Custom form templates can save you time and effort by allowing you to reuse a pre-designed form layout. Let’s go through the steps.
You can also watch the video tutorial:
Having said that, let’s move on to the steps on How To Create a Custom Form Template In WPForms.
Step 1: Create a Form
- Hover over WP Forms and click on “Add New” to create a new form.
- Give your form a unique name and select the template of your choice. You can also select a blank template if you want to start from scratch.
- Add the fields you want to include in your custom form template. For example, drag and drop the checkboxes field into the form builder area. Customize the field options, such as renaming the label, as per your requirements.
- Once you have added the fields and made the necessary changes, click on the “Save” button to save the form.
Step 2: Export the Form Code
- Click on “Tools” under WP Forms in the sidebar.
- From the available tabs, click on “Export”.
- In the export tab, you will see an option to export the form template. Select the form you want to use as a custom form template.
- Click on the “Export Template” button.
- The form code will be generated. Copy the code, as it will be used in the next step.
Step 3: Paste the Code in Theme Functions.php File
- Hover over “Appearance” and click on “Theme Editor”.
- On the right side, click on “functions.php” under the respective theme you are using.
- Scroll down to the end of the code.
- Enter a comment to identify the WP Forms add-on, for example, “// WP Forms Add-on”.
- Paste the copied code below the comment.
- Click on the “Update File” button to save the changes.
Step 4: Use the Custom Form Template
- Hover over WP Forms and click on “All Forms”.
- If you have any existing forms, you can delete them.
- Add a new form by clicking on “Add New”.
- Under the “Template Library” category, you will find a section called “Custom Templates”.
- Click on it, and you will see your custom form template listed there.
- Click on the “Use Template” button to use this custom form template.
By following these steps, you can easily create a custom form template in WP Forms. This allows you to create a predefined form layout that can be used multiple times, saving you time and effort when creating forms in the future.
That’s it! Now you know how to create and use custom form templates in WP Forms. Enjoy the flexibility and convenience of reusing your custom-designed form layouts.