At this point you've placed a container field on your Contracts tab and labeled it as a signature. That's actually enough: if the user taps that field in FileMaker Go, they will asked what kind of file they want to store, with a signature as one of the options. But there are ways you can make the user experience better, such as:
- Adding text within the field itself to tell the user what to do
- Configuring the field so that it's only used for signatures (as opposed pictures, videos, files -- everything that a container field can store)
- Displaying special text on the signature capture interface
When a field is empty, you can set it up so that a message is displayed. This is called placeholder text. This text could give the field's name, the format of the data that should be entered, or it could provide an instruction. In this section, we'll configure the signature field to provide an instruction.
The signature field will contain an image of the person's signature. FileMaker calls this type of field a container. Container fields can be used to store images, videos, audio files, and even applications.
In FileMaker Go, when the user taps a container field, normally they are prompted to choose what kind of file they want to store (a picture, a video, a signature, and so on). Let's improve the user experience by making that choice for the user since we know they will be providing a signature.
Your button will perform a single script step. Script steps are automated actions that can be performed on their own (as in this case) or as part of scripts, which are a series of script steps performed one after the other. Scripts can be used to automate all kinds of processes.
You will use the "Insert from Device" script step, which specifies the kind of file that will be inserted into the container field. For a signature, you can store special text to be displayed on the signature capture interface.
Add placeholder text to the signature field, then set it up as a button that opens the signature capture interface when tapped.
- Choose the View menu > Layout Mode ⌘L or Ctrl-L
- Make sure you are viewing the Contract tab on the Customer Detail layout.
- Select the "Signature" field.
- In the Inspector, choose the Data tab.
- In the Placeholder text (when field is empty) box, type: Tap here to sign
When the field is empty, this text will appear inside of it.
- Choose the View menu > Browse Mode ⌘B
You should see the “Tap here to sign” message because no signature is present. Later on when you use iPad to capture signatures, the message will disappear.
Next let's set up the "Signature" field as a button so that it performs an action when clicked or tapped.
- Choose the View menu > Layout Mode ⌘L or Ctrl-L
- Command-click (OS X) or right-click (Windows) on the "Signature" field.
The following dropdown menu appears.
- Select "Button Setup" from the menu.
A Button Setup dialog window appears.
- Select the "Single Step" option from the Action dropdown menu.
A Button Action dialog window appears. This is where you'll specify the script step that the button will perform.
- In the progressive search box of the right-hand pane (below the heading Steps), type: device
FileMaker Pro displays a dropdown menu listing all the script steps that contain the word "device". In this case, "Insert from Device" is the only one that does.
- Double-click the Insert from Device script step to add it to the script.
The script step appears in your script with a blue gear icon to its right.
- Click the blue gear icon to specify the options for this script step.
A popup menu appears.
Just because the "Signature" field is the one you turned into a button, FileMaker Pro doesn't know that it's the field that will receive the signature. For example, you could have created an independent button instead. So let's specify the target field now.
- Select the Specify target field option.
A Specify Field dialog window appears. You are specifying the field that this script step will insert a value into.
- Double-click the "Signature" field to select it and close the dialog window.
This returns you to the Button Action window.
- Click on the Insert From drop-down list and choose "Signature...".
A Signature Options dialog window appears.
- Enter the following value into the Title box: Work Order Contract
- Enter the following value into the Message box: I have reviewed the attached contract and agree to the conditions as stated.
Consider using the Message box for disclaimers or other legal information.
- Enter the following value into the Prompt box: Sign here
- Click the OK button to save your changes and close the Signature Options dialog window.
Your script step is updated to reflect the options that you entered.
- Click the OK button to save your changes and close the Button Action dialog window.
Since the built-in signature functionality is only available in FileMaker Go, not FileMaker Pro, you won't test it now. As part of Goal 6, you'll have a chance to try it out on iPad.