Form
Interactive web form ⌨️

- Collect data;

- Form title;
- Submit button text (
Submit
by default); - Labels or placeholders. Switches the view of inputs—field names can be displayed above the field or as a placeholder;

Labels (on the left), Placeholders (on the right)
- Form max width in pixels.
- Default http-request params
Each field (available for writing (POST-requesting) or reading (GET-requesting) in API-endpoint) has a specific data type. You can find configure the form input field and set the default value, according to the field type.

You can display sections as sections or just invisible groups (useful for conditional sections):

Display as a section is ON on the left screen
Visibility of a section can depend on the user's choice of fields values above (or on existing objects fields, in case of object editing). If you add more than one conditional you can choose AND or OR operator to join your conditionals.
If you want to check if the field is empty, enter the
null
value. And accordingly, isNotNull
, if you want the field by any except of empty.
In this example the "Section 2" is visible if only the user choses value "bug" for the field {{feature_type}}
If the option Dropdown for
link
/arrayLInk
field is ON (it is OFF by default), objects from the linked structure may be displayed as options in selects (the visible name will be displayed, if there is no such, the id
field will be displayed). You need to create an API-endpoint for that (you may add different filters in that endpoint, like "objects, connected with the current user")Max quantity of options in the dropdown is 1000.
If you marked field as a hidden one (that is possible for string and link fields), they will be get from URL query params. That looks like (fieldOne and fieldTwo are hidden fields):
yourapp.directual.app/FormPage?fieldOne=value&fieldTwo=1984
Query params have to start with
?
and be separated by &
Here we will get in the submitted object:
fieldOne =
value
fieldTwo =
1984
You can include hidden field for User ID, which will be filled automatically if the user is logged in.
First, you need to have a field type of link to
WebUser
data structure available for posing in your API-endpoint.Find section in Personalisation section in Fields settings:

The user's ID will be posted in this field automatically. If the user isn't logged in, the field will be empty.
Remember, that you can configure your API-endpoint in a way, when unauthorised user will not be able to submit the form.
If you want to edit existing object plus to creating new you can turn on that option in Fields settings section:
Don't forget to add
id
field in API-endpoint available both for writing and reading. Also you must add all the fields you want to be fetched available for reading in API-endpoint settings. Keep id
be included into the form, but hidden — this is settings by default.There are three ways to get
id
of the object to edit:- 1.From query param
@editObject=_id_
form URL, where_id_
is id of the object you would like to edit. - 2.
- 3.Use user's
id
as anid
of object to edit. You could edit App user (WebUser
) object that way. Also any other object with such anid
. (this option usually applied for profile settings)
By default, after submitting the form, your user sees the success message and a button "Submit again". You may remove the button and disable re-submission, or to hide the button and redirect the user back to the form automatically in a few seconds. Also, you may edit the success message (even use HTML there)
Submitted object can be processed in sync scenario, and then the result is to be displayed to the user. There three fields of the object for interpreting the result of object processing:
- Result: success/fail. Boolean field. If the field is
true
, the Success block is showed. If that field isfalse
, the error block is showed. - Result message title. String field. The title of the result block.
- Result message text. String field (HTML usage is available here). The text of the result block.

Remember, that object is saved despite of the result of sync processing. But if object does not match validation rules, it is not saved!
Hint: you can build an online calculator for your app on that form with a sync result processing.
Last modified 1yr ago