4D v16.3Creating a form using the Form Wizard |
||
|
4D v16.3
Creating a form using the Form Wizard
Creating a form using the Form Wizard
You can create new forms quickly with the Form Wizard. You can use a new form immediately after creating it or choose to edit the form using the Form editor. The Form Wizard has two screens. The Basic screen lets you create new forms with a few simple operations. The Advanced screen lets you customize the form before you build it. To create a new form using the Form Wizard:
To display the advanced options of the Form Wizard, click on the Advanced... button on the basic screen of the Wizard. If you want to go back to the first screen of the Form Wizard, you can do so by clicking the < Back button. The Advanced screen also lets you create new forms with point-and-click operations but offers a wider variety of customization options. The customization options depend on the form type that you select in the first screen of the Form Wizard. The Form Wizard supports the following form types:
In addition, the Form Wizard lets you save your customization options as a template. The template name is added to the Template drop-down list that appears on the Basic screen of the Form Wizard. With user-defined templates, you can create highly customized forms quickly from the Basic screen of the Form Wizard simply by selecting the desired fields and your custom template. The Fields page is similar to the Basic screen of the Form Wizard. The Fields page is used to add fields to the form in exactly the same way as on the Basic screen of the Form Wizard. This functionality is duplicated for users who want to skip the Basic screen and go directly to the Advanced options screen. For a complete description of the process of adding fields to the form, see the previous section. The Fields page offers an additional option: Enterable Related Fields. This option lets you choose whether or not to assign the “Enterable” property to the fields of related tables. By default, this option is checked (the fields are enterable). It may be useful to uncheck this option, for instance if you want to prevent users from being able to modify the values of related fields when the “Auto assign related value in subform” option is checked for a relation (for more about this, refer to Relation properties). The Options page sets various options concerning form size, placement of field labels and the display of the form. This area lets you specify the form size. You can adjust the form size to its contents or set the form to a fixed size either by entering its maximum width and height, or by selecting a screen size. You can also combine the two settings. The Screen Sizes drop-down list gives you the following choices:
The values correspond to the width x height ratio, expressed in pixels. When you enter a screen size or choose a size from the drop-down list, the preview area changes to reflect your selection. The Form Wizard will try to adjust field and object placement on the form so that all the form objects will fit in the selected screen size. If the Create Multiple Pages if necessary option (see below) is selected and 4D cannot make all the fields fit on one page, it will generate multiple display pages to fit all the fields on the form. If the Form Wizard generates multiple pages, it places buttons, the form title, and decorative rectangles on the background page (page 0).
The Label Location area on the Options page lets you set where a field label is placed in relation to the field. If you want labels, they can be placed either in front of or above the fields. The Display Options area on the Options page lets you add several optional elements to the form and set additional options. Your choices are:
The Buttons page lets you customize the buttons used in the form. Note: This page is not available for "List form for Printing" and "Detail form for Printing" type forms. List and Detail forms (non-printing) use buttons to let the user save and cancel changes to a record, or move from one page to another in a multi-page form. On the Buttons page, you can choose a button design, choose the desired button actions, specify the position of the buttons on the form, and label each button. Note: In the Form editor, you can add, delete, or reposition other buttons or other controls and attach methods to them that specify their action when clicked. The Button Family and Buttons Location areas let you choose the style and location of the buttons. 4D provides a set of built-in button actions. When you assign a built-in button action to a button, you don’t need to write a method to specify what happens when a user clicks the button. The number of built-in actions will depend on the form category (table or project). For example, actions for moving between records in a table cannot be used with project forms. For detail forms, the following built-in button actions are available via the Form Wizard:
The following actions are only available for table forms:
Note: When you insert a subform, 4D can automatically insert two additional subform buttons if you click the Addition and Deletion Buttons check box in the Options area of the Subform page. The subform buttons are: Add (adds a new record to a Many table or a subtable), and Delete (deletes the currently selected record in the subform). 4D provides other predefined actions to buttons. These actions are available when you create a form using the Form Wizard or when you modify a form using the Form editor. For more information, refer to Standard actions. The default buttons are listed in the Actions area of the page: You can select and deselect automatic buttons in the same way that you can add or delete fields from the form on the Fields page. The buttons that you add to the Selected Actions area appear on the form. Note: Even when they are selected in the “Selected Actions” area, the page management buttons (Previous Page, Next Page, etc.) will only be included in the form if it is necessary to create a multi-page form. If you want to modify the default label of a button (the template chosen must include labels), highlight the button in the Selected Actions list and enter a new label in the Label area. After entering the label, press Tab or click another button in the Selected Actions list. The label you entered is then displayed in the preview area. Notes:
The Subform page lets you add a subform to the form. This subform must come from a related Many table if you want to be able to benefit from the automatic update mechanisms concerning subforms When you want to use fields from a related Many table, add a subform to the form. The subform lists several records at once. Using a subform allows you to view the related records or those from another table. You can also enter information into records that are displayed in the subform. You can display fields from a related Many table, or an unrelated table in a subform. If you include fields from a related Many table, the relation determines which records are displayed. If you include fields from an unrelated table or from a table with a manual relation, by default the current selection of records from that table is displayed. You can also control the selection of records using a method. The Subform page of the Advanced screen lets you use a form as a subform, specify subform options, and add buttons to allow users to work with the subform. To add a subform to the form, check the Include a Subform option. Select the table for the subform from the “Table” drop-down list and then select the subform to be used from the “List Form” drop-down list. You can also use the “Detail Form” drop-down list to set the form page to be displayed when the user clicks on the subform. This subform then appears in the preview area as part of the current form. You can set the following options for the subform:
For more information about these options, refer to List subforms. When you have finished specifying all the properties of the new form, click OK on any page to create the new form. When you click OK, the following dialog box appears: To create the new form, click either Use to switch to test the form (table forms only), or Edit to open the new form in the Form editor. The form validation dialog box gives you the option of creating a new form template using the current Advanced settings by default (buttons, options, etc.). If you create a form template, its name will be added to the template drop-down list in the Form Wizard. The form template is saved separately from the form itself. To create a form template, click on the Yes button and enter its name in the Template Name area.
|
PROPERTIES
Product: 4D
HISTORY
ARTICLE USAGE
4D Design Reference ( 4D v16) |