Skip to content

Add forms in a dashboard

Forms let you get data from a user and store its answers within a Storage in the internal datawarehouse.

This underlying storage can then be used in a dashboard. You can also show the list of answers in a table right beside your form (e.g. for a small todo-list app).

Steps and options to create a form

The first step is to create a new storage. Then, in your app, create a form widget and add your form's fields.

For a given field, the field label is the visible label above each for field. The Column name is the name of the column where this field will be stored in the storage (you can usually keep the default value).

When the first form is submitted by a user, the columns will be automatically created in the underlying storage.

If you add a field later in your form, the corresponding column will be added automatically in the storage.

Once a field is created, you can edit it by clicking on the cog icon beside its name. But you cannot edit anymore its type or its column name. If you need to change the type, you must re-create another field (with a different column name).

Mandatory

If you enable the Mandatory option on a field, the user won't be able to submit its answers if this field is empty.

Adding timestamp and username

In the Form Fields section, there are two checkboxes to automatically add the hidden fields: timestamp and username. It's a good practice to keep those checkboxes checked. When enabled, in the storage, you will have a column timestamp which will contain the timestamp when the form was submitted and a column uesrname showing the name of the user who submitted the form.

Post actions

By default, after a form is submitted and the data has been stored, it shows again with empty fields. No other action is done.

A first option is to Refresh widgets. If activated, after the form submission, the widgets of the curren tab will be refreshed. This is useful if you have widgets showing the content of the storage where the form data is saved. It will show the latest data after the form is submitted.

Another option lets you redirect the user to another tab after the form is submitted. You must provide the tab index ( remember that the first tab has index 1, the second one index 2, and so on). To create actual apps, an option is to hide the tabs (in the `Layout & Print' menu), so the user feels in landed in a new page (e.g. where you can thank him for answering the form).