Firebase Form

The Firebase Form  Widget lets you build a user form with various entry fields that can be used to insert new records or update existing records.

Adding a Firebase Form to a Page

In order to add a JSON Form to a page, just drop it from the Widget list and double-click on it:


Exemple of Firebase Form

For more details about the form fields types and parameters, please check the User’s Forms documentation.

User Form Workflow

In order to send the form’s data to an API, you must get the following parameters:

  • Type “Firebase Form” by default

  • Initial Value. 3 possibilities:

    • Empty Form (New Record): the form will insert a new record in the Collection

    • Load Data From Firebase Repeater: if the page containing the Form is called from An Action button placed inside a Firebase Repeater Line or inside a Firebase Displayer, then the Firebase Record will be automatically loaded and will display the record in the Form. The Submit Form action will then Update the Record with the new values.

    • Load Unique Firebase Record: if this Option is selected, the Form will automatically load the record linked to the current user in the Form fields. If the Record doesn’t exist, then it will be created automatically. Submitting the Form will update the values of the record.
      For example, if you want to manage extended user profile fields, you can use the Collection thorium.users with this form behaviour.

      There is a Tutorial that explain the behaviour of a Single Record Form available here: Using Firebase Single Record Form

  • Triggered Action “Google Firebase Data” by default

  • Action Settings. Automatically assigned depending on the Initial Values settings.

  • Firebase Collection. The name of the Firebase Collection where you want to Add or Edit Data

  • Success. You can choose here what’s happening when the Form has been submitted: “Back to Previous Page”, “Back to Home Page”, “Clear the Form” (if you want the user to being able to insert many records)

  • Show Custom Message. An optional message that will be displayed to the user after the data have been successfully sent to Firebase

  • Error Custom Message. An optional message that will be displayed if the Firebase API can’t be called with success.

Copyright©  Nymphide Lab 2020 - All Rights Reserved