# Signature

This question type is used in cases where the responder needs to sign a document.&#x20;

{% hint style="info" %}
If you would like the responder to check a confirmation box instead of a signing, use [confirm](https://docs.formsort.com/adding-questions-and-content/question-reference/confirmation) type instead.
{% endhint %}

### Universal Signature

The universal signature component allows responders to either **type** their name and adopt a generated signature or **draw** their signature directly within the form.

**Type (adopted signature):** The responder enters their name and clicks *Adopt and sign*. This creates a valid electronic signature and submits signature metadata to your [answers endpoints](https://docs.formsort.com/integrations/getting-data-out#sending-answers) and [Formsort Data Storage](https://docs.formsort.com/saving-and-retrieving-responses). This method does **not** generate an image file for file upload integrations.

<div align="left" data-full-width="false"><figure><img src="https://1036686854-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MJPnL__mOdr_mLZ8nwf%2Fuploads%2F7cPwX10zYMPfdB9DWlf8%2Fimage.png?alt=media&#x26;token=c39c3ca5-cd88-48d2-9b8d-e1d581ca9400" alt="" width="518"><figcaption></figcaption></figure></div>

**Draw:** The responder draws their signature using their mouse or touch input. This method behaves like the default signature component and will generate an image file that can be sent to your configured file storage integration.

<div align="left"><figure><img src="https://1036686854-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MJPnL__mOdr_mLZ8nwf%2Fuploads%2FCaBr7JGwIsnLBqJNAB51%2Fimage.png?alt=media&#x26;token=d525fa96-09fd-4876-9534-d1fe953e91ee" alt="" width="482"><figcaption></figcaption></figure></div>

Both methods capture key signature data, including the signer’s name, timestamp, and signature method, which are included in webhook submissions and stored response data.

### Managing File Storage

By default, Formsort securely stores uploaded files and images with our [data storage service](https://docs.formsort.com/saving-and-retrieving-responses) — no setup required.\
If you prefer to manage your own storage, you can optionally configure an **S3** or **GCS** bucket as a custom file destination.

To set up a custom integration, follow our detailed guides for:

* [Amazon S3 setup](https://docs.formsort.com/integrations/integration-reference/s3)
* [Google Cloud Storage setup](https://docs.formsort.com/integrations/integration-reference/google-cloud-storage)

### Creating a filename pattern&#x20;

You can opt to define a naming pattern for the signature images that your responders upload by enabling **Filename pattern** in the question settings.&#x20;

You can [template](https://docs.formsort.com/variable-templating) any relevant variable you would like to be included in the name of the file into the field. For example, if you type in `{{first_name}}` into the field, the value of the `first_name` variable will be used as the filename at upload.&#x20;

Formsort offers three custom variables for these types of file upload components, built right into the settings of the component itself: `sessionUuid`, `randomUuid`, and `currentTimeUTC`. These variables can be [templated](https://docs.formsort.com/variable-templating) into the **Filename pattern** field to create dynamic filenames.

* `sessionUuid`: a uuid that is created **once**, when the form is loaded.&#x20;
* `randomUuid`: a uuid that is **created at and re-run** at each upload instance.&#x20;
* `currentTimeUTC`:  a timestamp that is **created at and re-run** at each upload instance.&#x20;

<div align="left"><figure><img src="https://1036686854-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MJPnL__mOdr_mLZ8nwf%2Fuploads%2FxaR47FBUOCoQFFsn9E6j%2Fimage.png?alt=media&#x26;token=66c75460-c7d8-4e99-bd26-7210a9af01d8" alt="" width="563"><figcaption></figcaption></figure></div>

You can use several of these variables at once, if required, and one pattern we suggest is `{{currentTimeUTC}}_{{responder_uuid}}`. This ensures uniqueness via the timestamp, while still tying the file to a particular user via the `responder_uuid` System Library variable.&#x20;

{% hint style="info" %}
Visit the [System Library variables](https://docs.formsort.com/response-data-collection-and-management/variable-schema/system-library-answers) section for details on built-in variables that provide information about the responder's environment and context.&#x20;
{% endhint %}

Note that these extensions will be added automatically. You should also set a fallback naming convention in case the variable is not defined by typing it into the **Filename pattern fallback** field. Values here cannot use templated variables.&#x20;
