Create a form
You have created the map and feature layers required for data collection. Next, you will build a form in Field Maps Designer that mobile workers will use to collect information about park amenities.
Start a blank form and add groups
You will create a form from scratch and add groups that are relevant to your project.
- Browse to the
Field Maps Designer home page and sign into your account.
The Maps page appears.
-
Click the Park Asset Inventory map you created in the Create a map with Field Maps Designer tutorial.
The Forms page opens with a blank form canvas.
In the Forms section, the Layers list displays each layer in the map. When mobile workers fill out and submit a form in Field Maps, they are adding or updating a feature within the layer. You can build a form for each of the three layers, but for this tutorial you'll focus on the Amenities layer, which is selected by default as indicated by the blue line next to it.
Mobile workers will use the form to add park amenity features to the layer. To build the form, you'll use form elements found in the Form elements pane.
- In the Form elements pane, in the Layout section, click the Group element and drag it onto the form canvas.
A group is added to the form.
- Close the Properties pane.
- In the same manner, add a second Group element to the form.
Like sections on a paper form, group elements allow you to group information together in sections that can be collapsed and expanded in Field Maps.
Note:
When you first add an element to the form, the layer name is used as the form title. You'll change the form title later.
- In the form, click the first group element.
The Properties pane appears.
- In the Properties pane, for Display name, type Collector information.
The name of the element updates in the form.
- In the form, click Group name 2 and change its name to Amenity information.
The two groups should look like the following:
- Click the Save button to save the form.
When you save, it saves changes to the map. However, you can also save changes to the layer if you want to reuse the form across other maps. For this tutorial, you'll save to the map. To learn more about saving to the layer, see Save the form.
- Close the Properties pane.
You have created a form and added two groups. Now you are ready to add elements to the form.
Enhance your form by adding basic and choice elements
Mobile workers using a form in the field must have boxes to type into or drop-down menus to choose from so they can enter information properly. There are two types of form elements that you can add: basic and choice. Basic elements include things such as text boxes, date and time options, and numbers. Choice elements allow users to make choices in the form, such as a combo box containing several options, a switch, or a list.
Add basic form elements
You have created the form and have added two groups to it. Next you'll add basic form elements to each group.
- In the Form elements pane, in the Basic section, drag a Text - Single line element to the Collector information group.
- In the Properties pane, enter the following information:
- For Display name, type Name.
- For Field name, change the existing text to collector_name.
- For Placeholder, type First and last name.
Placeholder text appears in the form element until the user inputs their own data, providing a hint about the type of information they should provide.
- Close the Properties pane and save the form.
Next, you'll add a number element to the same form.
- In the Form elements pane, drag a Number - Integer element to the Collector information group and place it under the Name box.
- In the Properties pane, enter the following information:
- For Display name, type Collector ID.
- For Description, type Enter the two digit ID assigned to you by the Park Committee.
- In the Logic section, check the Required check box.
- Close the Properties pane or click off the form to close it.
- Add a Date/Time element to the Collector information group and place it under the Collector ID box.
- In the Properties pane, enter the following information:
- For Display name, type Collection date.
- For Start date, click the drop-down menu and choose today's date.
- For End date, click the drop-down menu, and choose a month from today.
- Close the Properties pane.
The Collector information group is complete.
You've added basic elements to the Collector information group. Next, you'll add form elements to the Amenity information group.
Add choice form elements
Next, you will add choice elements such as combo boxes, option buttons, and switches to allow field workers choices when using the form in the field. You'll begin by adding a combo box containing all the park names for your area.
- Add a Combo box element to the Amenity information group.
A combo box element displays options as a drop-down list in Field Maps.
- In the Properties pane, enter the following information:
- For Display name, type Park name.
- For Field type, choose or verify String.
- Click the Create list button.
The List of values: Park name window appears. In this window, you can add the options that mobile workers can choose from when using the form in the field.
The Label value is displayed in the form, and the Code value is stored in the layer. You can manually add values, or you can upload a .csv file to automatically populate values. To save time, you will import a .csv file containing the correct options.
- Download the ParkNames .csv file.
- Go to the Downloads folder and drag the ParkNames file to the List of values window.
The list of values is populated with the park names from the .csv file.
- Click Done and click Continue. Close the Properties pane.
- Add a Radio buttons element to the Amenity information group.
A Radio buttons element displays options as buttons on the form.
To reduce the amount of scrolling on the form, only use this element for five or fewer options.
- In the Properties pane, enter the following information:
- For Display name, type Amenity type.
- For Field type, choose or verify String.
- Click the Create list button and manually add the following values by clicking the add button after typing each:
Label Code Bench
Bench
Trash
Trash
Recycling
Recycling
Light post
Light post
Restroom
Restroom
The Code values are automatically carried over from the Label values. You can change the code values if you want them stored differently in the layer; however, you'll use the same values for labels and codes in this example.
- Click Done and click Continue.
The Amenity information group updates on the form.
- Close the Properties pane.
- Add a Switch element to the Amenity information group.
Switch elements display two options as a switch on the form. They allow mobile workers to quickly select between two options and are useful for yes or no questions.
- In the Properties pane, enter the following information:
- For Display name, type Has damage?.
- For Field type, choose or verify String.
- In the Switch values section, for Off value, type No, and for On value, type Yes.
- For Default value, choose No
- Close the Properties pane and save the form.
The Amenity information group is complete.
Next, you'll title the form.
- Click the default form title (Amenities) to edit it.
- In the Properties pane, for Form title, type Park Amenity:
After the text, you'll add a field value so the form title is specific to the amenity type mobile workers are collecting.
- Next to the title, click the Add field button.
- Click the Amenity type field and click Done.
After mobile workers select the Amenity type option when filling out the form, the form title will update to reflect the type of amenity being collected.
- Click the Save button to save the form.
Now that you've built the form, you can share the map with mobile workers so they can begin collecting data. To learn how to share the map, see the next tutorial in the series, Share a map for use in Field Maps.