In This Chapter
The basic user interface object in Servoy is a form. Forms are also a unit of scope in Servoy, meaning that forms can have variables and methods attributed to them. For more information about scope, see Implementing Business Logic.
To create a form, choose one of the following ways:
Any of these actions will open the New Form Wizard that will walk you through creating a form.
To walk through the options available in the New Form Wizard, these instructions will use the example_data
connection and the customers
table.
-none-
. In the given example, select example_data.customers
.Notice that the name of the table will appear in the name field. This name can be edited; keep in mind that no two forms can have the same name in the solution. For our example, name this form 'customers_dtl'.
TIP
Naming conventions can help one keep track of forms and tell what the form purpose is just by its name.
There are options on how the data providers will be added to the form. For the most part, for a regular Record View form, only the Place with Labels option checked is needed. For this example, just select Place with Labels.
NOTE
Forms normally are created in Record view, but if one selects Fill text property and Place horizontal, the form will be set in Table view.
To edit a pre-existing form in Form Designer:
To edit a form in Script Editor:
NOTE
Right clicking in either editor view will display a menu that has the option to open the form in the other editor view.
Example: when a form is open in Form Designer, right click and select Open in Script Editor from the context menu to see the form in Script Editor.
Saving a form is the same as saving any other editor view in Servoy Developer, see Intro to Servoy Developer