Subordinate Forms
INTRO Hello and welcome. In this lesson, we’ll be discussing Subordinate Forms. Platfio forms are infinitely expandable, they give you the power to structure data however your business needs. One of the ways you can achieve this is by nesting one form inside another form to create complex data structures. For example, let’s look at how we can create a list of dependants inside of an induction form. Let’s get started. EDITOR/EMULATOR First, let’s go to the Platfio Editor and go to our Inductions Form Collection. Next, let’s create a new form and let’s name it Dependants. Now, let’s define the fields. Add a text field for the first and last name, a date field for the date of birth, a number field for the phone number, and a text field for the email address. Press 'Add' to save.
Before we move on to the next step, let’s grab two important IDs from this form. First, go to the History tab and copy the form ID at the bottom. Then, go to the Fields tab, click on the first name field, and copy the field ID at the bottom. Make sure to paste these IDs into a notepad and label them accordingly.
Next, let’s go to the Induction form where we’re going to nest our dependants. Add a new field, choose Array for the type, and name it Dependants. Scroll down to the Configurations section and press 'Add.' Press the dropdown button and choose Array Form ID, then paste the form ID we copied earlier into the value section and press 'Add.' Next, add a second configuration, choose Array Map Key, type 'id' in the value section, and press 'Add.' Finally, add a third configuration, choose Array Map Heading Key, paste the field ID we copied earlier into the value section, and press 'Add' to save the changes. Press the more options button and reorder the Dependants field to a more appropriate spot and press save.
As you can see in our Emulator, a Dependants section has been added to our Induction form. Let’s add a dependant and press save. As you can see, the first name is being displayed since it was defined in the form field array configurations. You can click on the dependant to edit details or delete it. The reorder button will also be available if you add multiple dependants, allowing you to rearrange them. OUTRO Thank you for watching this tutorial on Subordinate forms. If you have any questions or need further assistance, please don't hesitate to contact our team for support.