How to publish a form built with Formidable
Once you have created a form, you may publish it on a page, post, View, or widget.
There are several simple ways to publish a form:
- Embed a form on an existing page
- Embed a form on a new page
- Embed a form using shortcode
- Insert a shortcode manually
- Use a form block
- Use the Formidable Form widget to display a form in the sidebar
- Advanced users may also insert forms using PHP
Access the Embed form modal
When you create a new form or edit an existing form, you can see a new Embed button at the top menu. This button is available on both the Form Builder and Form Settings pages.
When you go to the Formidable → Forms List page, click the <> icon under the Actions column to load the Embed form modal.
Embed form on existing page
- Go into your form and access the Embed form modal.
- Click Select existing page to embed your form into an existing page.
- Select the page where you want to embed your form from the dropdown selection.
- Click the Insert Form button. It will redirect you to edit the page and automatically insert the new block with the embedded form.
- Click the Update button to save your changes. The newly embedded form will not save the new block right away. If you do not publish the page, it will be the same as before.
Embed form on new page
- Go into your form and access the Embed form modal.
- Click Create new page to embed your form into a new page.
- Set a name for the new page and click the Create page button.
- It will redirect you to the newly created page with the embedded form as a block.
- Click the Publish button to publish the new page. The new page with the embedded form is saved as drafts and not published right away.
Embed form using shortcode
- Go into your form and access the Embed form modal.
- Click Insert manually to get the WordPress shortcode or PHP code that you can use to embed your form in any place.
- You can insert the WordPress shortcode on a page, post, or text widget. If you want to embed the form into your page template, you may use PHP code.
- If you have the Formidable API add-on activated, it will show the API form script and API form shortcode.
If you would like to know more about the available shortcode parameters, follow the documentation to customize your form.
Insert the shortcode manually
You may insert the following shortcode on a page, post, or text widget to display your form.
[formidable id=x]
Replace x with the id or key of your form. This id can be found by going into your form and looking in the upper right corner and then clicking 'Show'.
If you would like the form title or description to be displayed with the form, use the following shortcode.
[formidable id=x title="1" description="1"]
Please note, the title and description are NOT shown by default.
Parameters
The following parameters may be used to customize your published form.
Required
- id - ID or key of the form to publish. Using the key on a WP multisite install can by useful when copying a form from the main site to other sites. The key is copied, but the ids may differ from blog to blog.
[formidable id=x]
Optional
- title - Show the form title with your form.
[formidable id=x title="1"]
- description - Show the form description with your form.
[formidable id=x description="1"]
- minimize - Minimize your form HTML. This will remove extra white space in your form HTML that is added if your form is double-filtered by another plugin or your theme.
[formidable id=x minimize="1"]
- entry_id - Specify an entry to edit. This can be a specific entry ID or entry_id=last to edit the most recent entry. Editing must also be enabled for this form and allowed for this user in the form settings.
[formidable id=x entry_id=y]
- readonly - Allow editing of all read-only fields.
[formidable id=x readonly=disabled]
- fields - Specify which fields to include in your form. Use a comma-separated list of field keys or ids.
[formidable id=x fields="10,11,12"]
Replace 10, 11, and 12 with your field IDs. When using a section or embed form field, you can include all fields within the field type by using the section or embedded form field ID/key.
If you use fields="", it will not include any fields in the form resulting in only a submit button.
[formidable id=x fields=""]
- exclude_fields - Exclude specific fields from your form. Use a comma-separated list of field IDs or keys.
[formidable id=x exclude_fields="10,11,12"]
Replace 10, 11, and 12 with your field IDs. When using a section or embed form field, you can exclude all fields within the field type by using the section or embedded form field ID/key.
- parameter - Pass a value to the form. When you pass a parameter to a form, you can use [get param="my_param"] to automatically populate a field.
[formidable id=x my_param="value"]
- page - Specify which page you want the form to begin.
[formidable id=x page="2"]
Start the page based on the value of a parameter, [get param="start-page"].
[formidable id=x page="start-page"]
Use a form block
The WordPress block editor gives you alternate ways of publishing a form. Please see how to add a form block.
Use a form widget
Formidable Form widget
You may use the Formidable Form widget to add a form to your sidebar.
- In your WordPress dashboard, go to 'Appearance' → 'Widgets'.
- Drag the widget called 'Formidable Form' into your sidebar.
- Enter a Title for the widget (defaults to the form title if left empty).
- Select a Form to display.
- Select Show Description if you would like the form description to be displayed.
- Save your widget.
Elementor Form widget
If you're using Elementor, you can use the Formidable Form widget to add a form to your page.
- In your Elementor builder sidebar, go to Appearance → General.
- Look for the widget called Formidable Forms and drag it to your page.
- Select a Form to display.
- Toggle Yes/No on the available content form options.
- Show Form Title: Displays the form title at the top of the form.
- Show Form Description: Displays the form description below the form title.
- Minimize HTML: This will remove extra white space in your form HTML that is added if your form is double-filtered by another plugin or your theme.
- Save your widget.
Form preview page
The form link to the preview page is publicly available, and works the same way as a form published on the page. Link to the preview page for a form landing page without the theme header and footer. This works great for surveys and polls.
Limitations
Multiple forms on one page
As long as you are publishing different forms, it is no problem to have multiple forms on one page. But we do not recommend publishing the same form multiple times on one page. Each form and field has a unique HTML ID. You will get duplicate ID warnings if you have the same form published multiple times on a page.
The forms also have field-specific JavaScript for calculations, datepickers, and conditional logic, repeating sections etc. that can cause conflicts if the field is present multiple times on the page.
PHP Alternative
If you would like to insert a form into your page template, use this PHP:
echo FrmFormsController::show_form(x, $key = '', $title=true, $description=true);
If you need more options, you may use this code instead:
echo FrmFormsController::get_form_shortcode(array('id' => x, 'title' => false, 'description' => false, 'readonly' => false, 'entry_id' => false, 'fields' => 'field1,field2,field3'));
Replace ‘x’ with the form id. All shortcode parameters can be used in the PHP call as well.
Troubleshooting
Slow form submission
Some sites may see a long delay after the form is submitted. This means some action triggered after submit is causing a slow down.
The most common reason we see for this is related to slow PHP emails from web servers. To check if this is the case, add a line of conditional logic to your email settings that will never be true. Then try to submit the form again. If this solves the speed issue, install an SMTP plugin to avoid using your webhost email servers.
If the form submission is slow when no emails are being triggered, disable any custom code that is fired after form submit, and add conditional logic to each form action in your form.
500 Internal Server Error after submission
You might see a 500 Internal Server Error message after submitting a form. It is often caused by a conflict with custom code or another plugin. To check if this is the case, follow the troubleshooting steps below.
- The fastest way to find the source is to get the exact error message that tells you which line of code on your site is causing the problem. To get this error message, check your PHP error logs, turn on WP_DEBUG mode, or contact your web host.
- If you can't find the message, or the message isn't specific enough, follow the steps to find the source of a conflict.
- Just like emails can cause a slow response, they can sometimes cause a 500 error. Follow the steps above to check if any form action has problems.
- Contact your web host if your database needs to be repaired or optimized. If you are using Siteground, they have detailed instructions for repairing and optimizing the MySQL database tables via phpMyadmin.
If the error continues after taking all the steps listed above, open a support ticket. Please include the exact error message so our team can help.
413 Request Entity Too Large
If you are updating a large form, you might see a 413 Request Entity Too Large error message. This error is most often caused by publishing a large form that has exceeded its allowed server configuration. To check if this is the case, follow the steps below:
- Increase the memory_limit and adjust the post_max_size in your php.ini file.
- Another possibility is caused by a conflict with custom code or another plugin. Follow these steps to find the source of the conflict.
- If the error persists after following all the steps listed above, please open a support ticket and include the exact error message.
This page isn't loading JavaScript properly
See spam troubleshooting.
Form token is invalid
See spam troubleshooting.
It looks like you've already submitted that
This error message is most often caused by the following reasons:
- Conflict with custom code or another plugin
- Corrupted form database table
- Duplicate submissions being received
Conflict with custom code or another plugin
If you have custom code or another plugin that is interfering with Formidable, follow the steps to find the source of the conflict.
Corrupted form database table
If there are no entries being created in this form, contact your web host and ask them if your wp_frm_items and wp_frm_item_metas tables need to be repaired.
Duplicate submissions being received
This message can appear when a duplicate entry is submitted in the form. If you want to allow duplicate entries, the best solution is to change the allowed time between duplicate entries with the frm_time_to_check_duplicates hook. By default, Formidable restricts the submission of duplicate entries within 60 seconds.
An alternative no-code workaround is to trick the duplicate checker into not recognizing a duplicate.
- Add a hidden field to your form.
- Click the input field to open the Default Values tab in the right sidebar.
- Click the Current Date and Current Time buttons to insert the [date][time] as the default values.