Form customization

ArcPad supports customization for the following form types:

Forms are developed and edited with the Form Wizard and/or Form Editor in ArcPad Studio. The Form Wizard is available only for Edit forms in layer definitions. The Form Editor is available for all types of customization files (that is, applets, default configuration files, and layer definitions). With layer definitions, you can create custom Edit, Identify, and Query forms that are associated with specific shapefiles or ArcPad Exchange File (AXF) layers, as well as General forms. General forms are not associated with specific layers, and can act as input forms, display forms, or any form that your application requires. With default configuration files and applets, you can only create General forms. Each form you create is stored with its particular type of customization file. That is, layer forms are stored in the layer file for shapefiles (*.apl) and in the ArcPad AXF file for AXF layers; applet forms are stored in the applet file (*.apa); and default configuration file forms are stored in the default configuration file (ArcPad.apx).

ArcPad supports a rich set of form controls. Each control has a set of attributes that define it, which are listed on the Control Properties dialog box. For example, the x and y attributes of a control determine the control's location on the form. Each control also has a set of properties and methods that are used to retrieve information about the control or modify various aspects of the control at run time via scripts. In addition, some controls generate a range of events as they are operating, and scripts can be called when these events occur. For example, a Button control generates an OnClick event each time it is clicked. A script can be associated with this event, allowing the form to perform custom actions, such as the calculation of one control value based on the values of other controls.

The following table shows the available controls and descriptions:

Controls

Descriptions

This is an example of a label.

A Label control displays static text, such as captions or instructions for using the form.

ComboBox control

A ComboBox control displays a single column list of choices that appear to drop down when clicked.

Edit control

An Edit control accepts one or more lines of information from you or displays one or more lines of information provided by the application.

ListBox control

A ListBox control displays a single or multicolumn list of choices. The columns of the list box cannot be edited.

Button control

A Button control performs a task when clicked. The text on the button describes its actions.

CheckBox control

A CheckBox control allows a user to turn (check) or turn off (uncheck) an option in the form.

RadioButton control

A RadioButton control can be combined with other RadioButton controls to provide an exclusive set of choices.

DateTime control

A DateTime control accepts a date from you or displays a date provided by the application. A calendar appears to drop down when clicked.

UpDown control

An UpDown control allows you to set a discrete value within a finite range of values, via its buddy Edit control. An UpDown control is oriented vertically.

Slider control

A Slider control allows you to set a discrete value within a finite range of values, via its buddy Edit control. A Slider control is oriented horizontally.

ImageBox control

An ImageBox control displays a static picture on the form, such as a company logo. The supported file formats are Joint Photographic Experts Group (JPEG), MrSid, and bitmap files.

SymbologyField control

A SymbologyField control links to a layer's legend. SymbologyField controls automatically display a feature's symbol and label as defined in the layer's symbology. You can select any symbol defined in the legend in a SymbologyField control. SymbologyField controls can only be added to layer forms.

DomainField control

A DomainField control automatically presents valid values from a subtype or domain (coded value or range domain) defined on a field in an ArcPad AXF layer. It also automatically switches between different domains when governed by a subtype (that is, no domain, range domain, or coded value domain). DomainField controls are available in the Fields palette in the Form Editor for fields that have domains. DomainFields are only supported for ArcPad AXF files (that is, the DomainField control is not supported for shapefile fields). When used with a subtype field, the DomainField control appears as a combo box, but automatically changes depending on the value of the subtype. DomainField controls can only be added to layer forms.

Edit forms

Edit forms replace the Feature Properties dialog box and are used for data entry, such as updating the values of a feature's attributes. Each Edit form you create must be associated with a specific layer.

NoteNote:

  • If no Edit form is supplied, but an Identify form is supplied, the Identify form displays in edit mode.

Identify forms

Identify forms replace the Feature Properties dialog box and are used to view, but not edit, a feature's attributes. This allows you to view data in a different style when a feature is being identified as opposed to when it is being edited. Like Edit forms, each Identify form you create must be associated with a specific layer.

NoteNote:

  • If no Identify form is supplied, but an Edit form is supplied, the Edit form displays in identify mode.

Query forms

Query forms add custom, layer specific query pages to ArcPad's Find dialog box. Query forms you create must be associated with a specific layer. Query forms can have multiple pages and when they do, each page is treated independently of others on the Find dialog box' that is, only the fields and operators used on the active page are used for the query.

NoteNote:

  • Create a Query form for a layer when you want to include streamlined layer queries with that layer that appears on ArcPad's Find dialog box, when the layer is present in a map.

General forms

General forms are created without any association with a layer. For example, an applet can provide a custom toolbar with a user-defined command that displays a form. The form takes user input, performs several calculations, displays a message to the user, then closes.

When you create a General form, you must give it a name. This name is used to access the form within a script. For example, a toolbutton's OnClick event handler script displays an applet form named "frmCalculator."

See the following VBScript, JScript, and Python code that accomplishes this:

VBScript

Applet.Forms("frmCalculator").Show 

JScript

Applet.Forms("frmCalculator").Show(); 

Python

Applet.Forms("frmCalculator").Show 

Script code similar to the ones previously shown might also be used in another form to handle a Button control's OnClick event.


2/7/2013