How to allow signers to configure their own form fields using BoldSign API?

BoldSign supports signers in configuring their own form fields while signing the document. This article will guide you on how to enable signers to configure their own form fields using the API.

You can allow signers to configure form fields by setting AllowConfigureFields as true while sending the document via API.

Here are a few code examples that demonstrate how to enable signers to configure form fields.

Code snippet

curl -X 'POST' \
  'https://api.boldsign.com/v1/document/send' \
  -H 'accept: application/json' \
  -H 'X-API-KEY: {your API key}' \
  -H 'Content-Type: multipart/form-data' \
  -F 'Signers={
  "name": "David",
  "emailAddress": "david@cubeflakes.com",
  "allowConfigureFields":"true"
  "formFields": [
   {
     "id": "Sign",
     "fieldType": "Signature",
     "pageNumber": 1,
     "bounds": {
       "x": 50,
       "y": 100,
       "width": 100,
       "height": 60
     },
     "isRequired": true
   }
 ],
  "locale": "EN"
}' \
  -F 'Files={your file}' \
var apiClient = new ApiClient("https://api.boldsign.com", "{Your API key}");
var documentClient = new DocumentClient(apiClient);

var documentFilePath = new DocumentFilePath
{
    ContentType = "application/pdf",
    FilePath = "{Your File path}"
};

var filesToUpload = new List<IDocumentFile>
{
    documentFilePath,
};

var signatureField = new FormField(
                id: "signature",
                isRequired: true,
                type: FieldType.Signature,
                pageNumber: 1,
                bounds: new Rectangle(x: 100, y: 600, width: 125, height: 25))

var formFieldCollections = new List<FormField>()
{
    signatureField
};

var signer = new DocumentSigner(
    signerName: "David",
    signerEmail: "david@cubeflakes.com",
    formFields: formFieldCollections,
    locale: Locales.EN);
    signer.AllowConfigureFields = true;

var documentSigners = new List<DocumentSigner>()
{
    signer
};

var sendForSign = new SendForSign()
{
    Signers = documentSigners,
    Title = "Sample Document",
    Files = filesToUpload
};
var documentCreated = documentClient.SendDocument(sendForSign);
Console.WriteLine(documentCreated.DocumentId);

import requests
import json

url = "https://api.boldsign.com/v1/document/send"

signer_data = {
    "name": "hanky",
    "emailAddress": "hankyWhites@gmail.com",
    "signerType": "Signer",
    "allowConfigureFields":True,
    "formFields": [
    {
      "id": "Signature",
      "type": "FieldType.Signature",
      "pageNumber": 1,
      "bounds": {
        "x": 100,
        "y": 100,
        "width": 200,
        "height": 100
      },
      "isRequired": True,
     
    }
    ],
    "locale": "EN"
}

payload = {
    'Signers': json.dumps(signer_data),
    'Title': "Sample Document",
    'CC': json.dumps(cc_recipients)
}

files = [
    ('Files', ('{Your file name}', open('{Your file path}', 'rb'), 'application/pdf'))
]

headers = {
    'accept': 'application/json',
    'X-API-KEY': '{Your API key}'
}

response = requests.post(url, headers=headers, data=payload, files=files)

print(response.text)

const axios = require('axios');
const FormData = require('form-data');
const fs = require('fs');
let data = new FormData();

data.append('Signers', '{\r\n  "name": "David",\r\n  "emailAddress": "david@cubeflakes.com",\r\n  "signerType": "Signer",\r\n  "allowConfigureFields": true,\r\n  "formFields": [\r\n    {\r\n      "id": "Signature",\r\n    "Type": "FieldType.Signature", \r\n "pageNumber": 1,\r\n      "bounds": {\r\n        "x": 100,\r\n        "y": 100,\r\n        "width": 200,\r\n        "height": 100\r\n      },\r\n "isRequired": true\r\n}\r\n  ],\r\n  "locale": "EN"\r\n}');

data.append('Files', fs.createReadStream('{Your file path}'));
data.append('Title', "Sample Document");

let config = {
  method: 'post',
  maxBodyLength: Infinity,
  url: 'https://api.boldsign.com/v1/document/send',
  headers: { 
    'accept': 'application/json', 
    'X-API-KEY': '{Your API key}', 
    ...data.getHeaders()
  },
  data : data
};

axios.request(config)
.then((response) => {
  console.log(JSON.stringify(response.data));
})
.catch((error) => {
  console.log(error);
});

In the above examples, update AllowConfigureFields to true. After executing the above code, the document will be sent to the signer, and then the signer can configure the form fields and sign the document.