Skip to main content

Introduction

Last updated 19/03/2024

Five's Form Wizard

info
To use Five's Form Wizard, at least one data source, such as a database table or REST API connection, has to be created in Five.

Five's Form Wizard is a fast and simple way to add your forms, as it automates a lot of configurations from your data source. Field definitions set at the table-level will be brought through to the Form Wizard.

Locate the Form Wizard

1. Select Visual in the menu.

2. Select Form Wizard in the sub-menu.


Form Wizard menu item
Figure 1 - Form Wizard menu item

Understanding the Form Wizard

There are two pages to the Form Wizard. The first page is divided into three sections, General, Menu, and Pages.


Page one of the Form Wizard
Figure 2 - Page one of the Form Wizard

General

In the General section, the first thing you need to do is select a data source, once you have done this Five will populate most of the other fields.

tip
Any default values the Form Wizard sets can be edited by you!

The following table describes the fields in the General section.

FieldDescription
Main Data SourceSelect your data source that you want to use for your form. A data source can be a table, a query, or a connection.
Select a Main Data SourceThis field changes to Dependent Data Source once you have selected a data source in the Main Data Source field. The dropdown will show None if there are no dependent relationships in your database. If you have an inheritance scenario in your database, it will enable you to use the two data sources for the form.
NameFive populates the Name field from your data source ID and this will become the name of your form. Exception: Five will use the dependent data source ID if one is being used to populate the Name field.
Action IDFive populates this field from the Name field and this will become the unique identifier for the form.
Page NavigationThe default is top. A top navigation will position tabs across the top of your form when there are multiple pages. Continuous will display your form in a continual flowing format.

The Menu section enables you to create a menu item for your form without going to the Menus view. Five will create a menu item that references your form making your form accessible in your application immediately. The following table describes the fields in the Menu section.

FieldDescription
Add Menu ItemThe switch defaults to true to make a menu item for your form. If you do not want a menu item created for your form, you can click the switch to turn it off.
CaptionFive populates this field from your data source and this will become the caption and the unique identifier for the menu item.
Parent MenuYou can select a menu to be the parent for the current menu item being created. The parent menu must reference a form action.

Pages

The Pages section enables you to create multiple pages for your form. These pages can reference other actions and make them available on your form. To be able to select an action to reference you must have that action saved in Five first.

Your first page is defaulted to a type of Form with a caption of General. No action is referenced as it is using the fields on the current form. The following table describes the fields in the Pages section.

FieldDescription
TypeSelect the type of page that will be available on the page.
ActionSelect the action to reference and make available on the page.
CaptionAdd a caption for your page.

There are several types of pages you can create for your form.

Page TypeDescription
FormWhen in the Form Wizard, your first page must have a type of Form. When a user selects the menu item referencing the form a list of records will be available and a new record can be added.
ListA list of records will be available and a new record can be added for the action (form) being referenced.
JoinA join page requires a many-to-many relationship in your database and switches will be available to click.
GridA grid page is represented as a table to add new records.
ActionThe action being referenced will be available. This could be a chart or a data view etc.

The Next button will navigate you to the second page of the Form Wizard. You can return to the first page by clicking the Previous button located in front of the Next button.


Next button
Figure 3 - Next button

Form Fields

The second page of the Form Wizard is where all your fields from your data source will be listed.


Page two of the Form Wizard
Figure 4 - Page two of the Form Wizard

The following table describes the fields used to create your form fields.

FieldDescription
FieldThis is the field ID for the field on your form. It is generated from the field ID in your data source and will be used to uniquely identify your form field.
CaptionThe caption for your field on your form, it is visible in your application.
Display TypeHow the data is displayed in your form.
ReferenceWhen a foreign relationship has been created at the table-level, Five will automatically reference the form associated to the data source as long as the form to reference is saved first.
DependentSelect a field from the current form on which this field will be dependent. This field will reset dependent on the value selected in the field it depends on.
Req.Make the field required.
ROMake the field read-only.
ListInclude the field in the list.

Reorder Fields

To reorder fields use the drag handles located at the beginning of each record. Drag and drop the record into position.


Drag handle
Figure 5 - Drag handle

How the Form Wizard Works with the Table Wizard

Lets take a look at an example. The following image shows the fields added in the Table Wizard (Not the Form Wizard). You can see several definitions here:

  • The DateOrdered field is required and has a display type of _Date.
  • The DatePaid field has a display type of _Date.
  • The OrderPrice field is required and has a display type of _Float.2.
  • The Other field has a display type of _Text.
tip

The display type is how your data is represented in your application!


Page one of the Table Wizard
Figure 6 - Page one of the Table Wizard

Now lets take a look at the second page of the Table Wizard. You can see that a relationship has been created with the Customer table and it is required.


Page two of the Table Wizard
Figure 7 - Page two of the Table Wizard

Now lets head to the Form Wizard and have a look at the form fields that will be added to the form. Initially you will need to select the data source (CustomerOrder) on the first page of the Form Wizard and then click the Next button to get to the form field definitions. You can see several definitions here:

  • Five does not list the primary key field for the table so it is not displayed on your form.
  • Five brings the unique identifier for the field up from the table-level and holds it in the Field field.
  • Five gives your field a caption based on the Field ID. If you use uppercase to define multiple words in your field, these will be separated for the caption.
  • The display type set for each of the fields at the table-level is brought up to the form-level.
  • As there is a foreign relationship with the Customer table, Five will make reference to the Customers form providing you have the form saved in Five before creating this form. A display type of _Lookup is given to the field, this will make it that on your form a dropdown will be available in the field to select a customer.
  • Any fields that were flagged as required at the table-level will also be flagged as required at the form-level.
tip
If you turn the Required checkbox off at the form-level, it will not be turned off at the table-level. The field will still be required unless you also unflag it in the table.

Form field records
Figure 8 - Form field records

Locate A Form Record

When you save a form record via the Form Wizard, you will find the record in the Forms view. This is where you can maintain the record.

1. Select Visual in the menu.

2. Select Forms in the sub-menu.


Forms menu item
Figure 9 - Forms menu item

3. Click the Edit button to make changes to your form record.


Edit button
Figure 10 - Edit button