How do I get a list of every field and it's corresponding field name for a form?

Description

There are several ways to get a list of field names for a Form Type.

Field names can be used in TPL to create conditional blocks, computed fields, and more. Having a list of the field names in your form is helpful when writing TPL. There are several ways to get a list of field names: from the Designer, on the Management Console, or using the Alpha TransForm API.

In the Designer

Select the Form Type from the list in the Designer and click 'Edit Form Commands'. In the left-most column, you will see a list of every command in the form including "field" commands. Each field command lists a summary of information here, including the field type, it's field name, the field Title, and it's preview value (if one is specified) in the following format:

fieldfieldType fieldName / "fieldTitle" (fieldPreviewValue)

For example, in the Pumpjack Inspection sample form, the Pumpjack ID field appears as shown below in the command list (the field name has been highlighted):

fieldlist PumpjackID / "Pumpjack ID" (value2)

To reference the field, it is expressed as #fieldname. For example:

#PumpjackID
Case matters. The field name must match case exactly as it is defined in the Field property for a field command.

Field can be used in Heading Templates and Listing Templates to display additional information (such as a customer's name) in the form lists. They can also be used in expressions (such as IF commands) to add dynamic behaviors to a form.

On the Management Console

You can get a list of form fields from the Quick Input editor. In the Management Console, select the Form Type you wish to get a list of fields for. Then, click the + Add Form button. Click the "Quick Input" option when prompted. This opens the Quick Input editor. Clicking the "Fields" button at the bottom of the editor will insert a list of all fields for the form using the following format:

fieldTitle (fieldname):

You can copy-paste the inserted fields to a text editor such as notepad to use as reference where needed.

/TransFormDocumentation/pages/images/mcInsertFields.png

Using the Alpha TransForm API

The GetFieldsInForm API method can be used to retrieve a list of form fields for a specified Form Type from an Alpha TransForm account. See the GetFieldsInForm method documentation for more information.