User Entity Forms
[Intro] In this lesson, we’ll be discussing setting up forms for your app. In particular, User Entity Forms. This feature enables your users to create a database. Let’s get started.
[Editor] To access the forms section, click on the Platfio editor, then click “Forms. You will be directed to the Forms Collection Editor page where you can manage and organize all the forms for your app.
To add a new collection, click on the plus button to access the form collection editor. Then, let’s name it Entities, and press save.
Once you’ve created a collection, let’s add a new form. Click on the plus button at the top right. This will open the Form Editor.
Let’s say we want to enable users to create a database of their favorite books. Under the details tab, let’s name this Book. Then, click the dropdown button in the Type section. Then choose Entity. The Setup section will appear. Click the Layers button next to it.
Per app databases are shared by all users of the app. Per user databases allow each user to have their own database.
To grant both the admins and users the ability to manage and view the database, select "Per user, Relevant User and admins manage and view."
Let’s say we want to enable our users to add the book’s name and the number of pages. Now, let’s go to the Fields tab. Click on the plus button to open the Field editor.
For the Name field, we’re going to put Name, and choose Text in the Type section. Then press save.
For the Pages field, let’s name this Pages, and choose Number in the Type section. Then press save.
Now that we have created our form, let’s make it easily accessible to users. Press the helper on the lower right corner and click the Windows icon. You can then choose where to add the form. This time, we’ll add it to the Left-Hand side menu.
[Emulator] Next, let's test the form from the user's perspective using the emulator. Open the Left-Hand side menu. We will see that the form we have added is available. Click on the form.
We can then add our database entry. Let’s give our entry a title “The Smartest Guys in the Room”, and the number of pages is “506”. Then, let’s go ahead and submit it.
[Manager] As a staff, if you want to see the entries submitted by the user, let’s go to the Platfio Manager tab. Then go to Users, and search for that user.
Next, click on Book and we can see all the journals submitted by that specific user. Take note that entries will not appear to staff if the database is set to “Only relevant user can manage and view.”
[Emulator] As a user, if we want to see our entries, we can go to the LH side menu and click on Profile. Then, click on forms. We will see all the past entries we have added to our database. We can also click on the gear icon to edit or delete our entry.
[Outro] Thank you for watching!