DbFace support to specify a form for the application to accept user's input.

You can build DbFace form from Design Mode or Code Mode.

Drag & Drop Builder#

DbFace has two major types of form controls: layout control and form control.

All form controls must be placed in layout controls.

drop and drop form builder in DbFace

Form fields#

DbFace Form Fields

Single Line#

Single Line allows the user to enter a single line of string data, the user can specify the data type in the property editor. If you specify a data type, before form submission, Dbface will check the input items whether the input items are the specified type, if not, the form will not be submitted.

Multi Line#

Multi Line allows the user to enter multiple lines of text.

Drop Down allows the user to select a data in a value list. Drop-down box needs to be specified the data source.

Radio Group#

Radio Group displays a list of all the values, and allows the user to select one value as the form data to submit.

Checkbox#

Checkbox displays a list of all the values, and allows the user to check multiple data to submit.

Multi Select#

Multi Select displays a list of all the values, and allows the user to select multiple values to ??submit.

Static Label#

Static label displays static data that can not be edited.

Text#

The text control can be used as the form description. DbFace integrates CKEditor as rich text editor.

Form field Properties#

DbFace Form Fields Property Editor

To edit the form field properties, click on the "Edit" button, and open the property editor.

Label#

Labels ar text items in front of form field, which can be used for user to identify this form field.

Name#

Form field script name can be used as variables in application scripts by Smarty manner. Such as: {$status}

Required#

This form field must be required. Before submitting, Dbface will check whether the value of this field is empty, if it is, the form will not be allowed to submit.

Disable#

This item can not be edited. Users can not edit this item.

Data Sources#

Only limited value form fields (such as Drop Down, Multi Select, Checkbox, etc.) have datasource options. DbFace supports two kinds of ways to use the datasource: Enter value directly and mapping script. ("Unrestricted" is generally used to preview the script, in fact, generally do not use this.)

  • Enter value directly:
    the user input datasource directly, one value per line. The value supports "key: value" division format. If this format is detected, Dbface will automatically take the previous value as the form value,the succeeding value as data displayed in the form. Value as a form before submitting value, the latter value data as displayed in the form inside.

Tip

Do not forget to use the data picker to help choose the data from the database.

  • Mapping Script:
    Users can use a query to set the data source.

Onchange Script#

Onchange script is general SQL query script.

When the user completes the input and focus are lost, the scripts will be executed and the result will be mapped to the current form control.

Build Form from Code#

If you need to build a form where Checkbox C is revealed If Checkbox B is Checked "No" or any combination of javascript actions and behaviors normally used in form building to make the Form "Smart".

Diving into source code, you can build logic embedded into options & choices for Forms.