The Embed Form field allows you to embed one form inside of another. The Embed Form field is especially useful if you want to use the same field, or group of fields, in several forms. A form can't be embedded in the same form more than once, but one form can be embedded into as many forms as you would like.
Please note: Repeating sections, page breaks, and embedded forms are not set up to work inside of an Embed Form field.
Standard field options
An Embed Form field has the following standard options:
Field specific options
Insert Form
Select the form you would like to embed into your current form.
Field icons
Field action icons allows you to duplicate, delete, and/or move a field on the form builder page. See the field action icons article for more information.
How to embed a form
- Go into edit a form.
- Click on Embed Form.
The title of the Embed Form field will not show on the front end, it will only show on the back-end. - Click on the field options and where it says Insert Form, select the form that you would like to embed.
Styling embed form
You may style the Embed Form field as a whole or you may style the fields individually. If you want to add a class to the entire embedded form, open the field options for the Embed Form field and insert a class in the CSS Layout Class box. When you add a CSS layout class to an Embed Form field, that class will apply to all fields in that embedded form.
To style the fields individually, go into the form that the Embed Form is pulling data from. You can add classes to the individual fields CSS Layout Classes in their field options.
Display values
The embed form field saves the id of the entry in the child form. To display this id in a view, use the id of the embed field added in your parent form, ie [45].
Limitations
Embedded forms are not designed to have a Repeater, Page Break, or another embedded form in them. This is not something we are supporting at this time. In addition, a form cannot be embedded in the same form more than once. An embedded form cannot be placed within a section. An embedded form can't create posts.
Troubleshooting
Actions not triggered on embedded form
By default, actions are not triggered for embedded forms when the parent form is submitted.
- If you’re planning to add actions on an embedded form, we recommend adding it to the parent form.
- If you want to trigger the action for all embedded forms or a specific embedded form, you can change it using the frm_use_embedded_form_actions hook.
- If you have set up the parent form and the child form to have the same actions, and use the frm_use_embedded_form_actions hook to trigger the embedded form's actions, all actions would be triggered.
Related developer hooks
- Determine whether the actions are triggered for an embedded form with the frm_use_embedded_form_actions hook.
- Prevent embedded form entries from being deleted when the parent entry is deleted with the frm_before_destroy_entry hook.