NC Photo and Signature
Not yet released: this component will ship in an upcoming Native Rent package version.
NC Photo and Signature takes photos, a signature, or both, on a Flow screen. Photos use the file uploader and are attached to a record. The signature is drawn on a pad and saved as a PNG File on the same record.
Use it for handover photos, a signed confirmation, or a damage report on a Rentable or Transaction Detail record.
Photos
Photos use the standard file uploader. It accepts image files with these extensions: .png, .jpg, .jpeg, .gif, .webp, .bmp, .tif, .tiff, .heic, and .heif. It accepts more than one file. Files are attached to Record Id. The new File Ids go to Content Document Ids. Map it in and out to keep the list if the screen is re-created.
Add it to a screen
- Add NC Photo and Signature to the screen. Set Mode and the Record Id of the record that will own the Files.
- Map Content Document Ids and Signature Content Document Id in and out of variables.
- Set Required and Minimum Photos as needed. Leave Show Clear Button on unless the pad should not be cleared.
- Files saved during testing stay on the record. Clear does not delete them.
After the user taps Save signature, "Saved." shows under the pad and is announced to screen readers. It clears when the user draws again or taps Clear. Drawing again after a save turns Save signature back on. Saving again adds a new version to the same File, so Signature Content Document Id keeps the same Id. After Clear on the same screen, Signature Content Document Id is blank until the next save, which also adds to that File.
Validation
- Required and Minimum Photos block Next. Minimum Photos is the only photo minimum. In Photo mode, Required with a minimum of 0 still asks for at least one photo. In Both mode, Required with a minimum of 0 asks only for the signature.
- When Record Id is set and a signature is required or has been drawn, Next is blocked with "Save the signature before continuing." until the user taps Save signature. This also applies when the user draws again after a save.
- Navigate After Selection can move the flow after a photo upload or a signature save.
Phone and desktop
Auto stacks the panels on a phone or a narrow column, and places them side by side on a wide screen when both are shown. 44 px touch targets apply at 600 px or less, on a phone, or on a touch screen. NC Photo and Signature has no Color Map.
Limits
- Photos and a saved signature File need a Record Id, permission to create Files, and access to that record.
- The signature File is created only when the user taps Save signature.
- A Signature Data URL without a record can be too large for a short text variable.
- Next checks that the signature was saved. It cannot wait for a save that is still running.
Properties
| Property | API name | Default | Description |
|---|---|---|---|
| Label | fieldLabel | (blank) | Optional heading shown above the component. |
| Help Text | helpText | (blank) | Optional hint under the label. |
| Mode | mode | both | photo, signature or both (default). |
| Record Id | recordId | (blank) | The record to attach Files to. Required to save photos or the signature as Files. Without it the uploader is disabled and a signature is held only in Signature Data URL. |
| Required | required | false | Block Next until the required photos and/or signature are captured. |
| Required Message | requiredMessage | (blank) | Optional. Blank uses the translated default. |
| Minimum Photos | minPhotos | 0 | Block Next until at least this many photos have been uploaded. 0 = no photos needed (in Photo mode, Required on still needs 1). Photo and Both modes only. |
| Signature Label | signatureLabel | (blank) | Optional heading above the pad. Blank uses the translated default. |
| Show Clear Button | showClearButton | true | Show a Clear button on the signature pad. |
| File Name Prefix | fileNamePrefix | (blank) | Optional prefix for the saved signature file name. Blank uses Signature. |
| Layout | layout | auto | auto (default), stack or side. Auto: stacked on phones or under 600px, side by side on wide screens when Mode is Both. |
| Disabled | disabled | false | Show the component read-only. |
| Accent Color | accentColor | (blank) | Selected and focus color, e.g. #0B5CAB. Hex, rgb() or a color name. Lightened or darkened until it reaches 3:1 against the tile color (or the theme surface if no tile is set). Also tints the focus ring and the selected/highlighted row. Blank follows the org theme (and dark mode). |
| Background Color | backgroundColor | (blank) | Optional color behind the whole component. |
| Text Color | textColor | (blank) | Optional. On choices and results: used as-is on the theme surface, or checked at 4.5:1 against a tile color if one is set. On the label and help: checked at 4.5:1 against the background if one is set; otherwise dark or white text is picked automatically. |
| Text Size | size | medium | small, medium (default), large or xlarge. |
| Corner Shape | shape | rounded | rounded (default), square or pill. |
| Alignment | align | start | start (default), center or end. |
| Navigate After Selection | navigateOnSelect | none | none (default), next, back, finish or pause. After a photo is uploaded or a signature is saved the Flow can move on, so you can hide the screen footer buttons. Next and Finish check Required first; Next becomes Finish on the last screen. |
| Available Actions | availableActions | (blank) | Set by Flow; do not map. |
Outputs
| Output | API name | Type | Direction | Description |
|---|---|---|---|---|
| Content Document Ids | contentDocumentIds | Text collection | Input and output | Ids of uploaded photo Files (ContentDocument). Map in and out to keep the list if the screen is re-created. |
| Signature Content Document Id | signatureContentDocumentId | Text | Input and output | Id of the saved signature File (ContentDocument). Map in and out to keep it if the screen is re-created. |
| Signature Data URL | signatureDataUrl | Text | Input and output | PNG data URL of the current signature. Used when no Record Id is set (the file cannot be saved), and to restore the pad if the screen is re-created. |
Shared behavior
Layout and width, required messages, colors, navigation, data sources, translations, accessibility, and the setup panel work the same way on every component. See NC screen components.
To copy this component's settings to another screen, use Copy settings at the top of its setup panel. See Copy settings.