In this article
Linking forms in Zengine allows you to connect multiple sources of data to one another, making your database even more powerful. Imagine that your business works with multiple clients, or companies. Each of these companies, in turn, may have multiple contacts. Instead of entering multiple sets of fields to accommodate these contacts onto your company form, you could instead create a contact form and link this to your company form. This would allow you to link as many contacts as each company had to that parent company form.
It is recommended that prior to setting up a linked form, you do some planning. Creating the forms and fields is easy, but what might take a bit more time is making sure your data flows logically. Most of the time linked forms have what is called a "one to many" relationship. This means that each one company, for instance, may have many contacts. Or one sales person may have many customers. Other times you may just need to have two forms that link to each other on a "one to one" relationship. For instance, if you have to collect a lot of data about one item at different times or from different people.
In order to link one form to another, you will utilize a field type that existing within the form builder: an input field called Linked Form. Review an introduction to the Form Builder here.
When adding this field, note that you should add it to the Child form and not the Parent form. In the example above, you would be adding the field to the Contacts form, which would then be linked to the Parent form.
When you add the field to your child form, you will have the opportunity to designate the parent form. Note that once you do this, you will not be able to change it. You would have to delete the field and start over if a change is needed.
Click "Save Form" in order for the change to take effect and your new link to be saved.
Things to Note
A parent form cannot be linked to its child. If you try to do this, you will get a circular relation error.
You also cannot link the same form to another form twice. You will receive an error if you attempt to do this as well.
Note that there is a limit of ten linked forms to one another in progression, or cascaded. In other words, just nine successive linked forms can be created. If you are trying to add a linked form and receive an error message, you may have too many cascaded forms linked to one another.
Viewing Linked Records
In order to view linked forms and relationships, go to the record in the Parent form whose linked forms you would like to see.
Here, we have a Submissions form, which has 4 forms linked to it.
By clicking the Linked Record icon:
you can see the records from each of those four forms that are linked to this particular record, and can navigate directly to those records to view more.
Conversely, on any given field, if you see the Linked Record icon next to it, you know that this is a linked field; a child field that is linked to another parent form.
In the above, Submissions is the child form of Applicants. By typing in an applicant email, it will link to that applicant's record in the other form.
Linked Field Display
Enable Linked Field Display
- To enable related records, edit the form that contains a linked field and where you want to display the data by going to the Data tab on the navigation bar, by going to the Form Tools button in the top right and then Edit Form.
- Next, expand the linked field that contains the data you want to display. Now, check the box to "Show Related fields for this Linked Form", select the fields you'd like to display.
- Finally, Save your Form
Linked Fields on Submission and Review Portals