Skip to content

Forms for creating files

The forms are used to create records in Trust and Sign without using the API / Web Services. They allow for rapid deployment of the solution without integration.

*** Pre-requisites for the use of file creation forms ***

  • Not all features of the Integration API are available with forms;
  • All documents to be signed must be configured as a template in the workflow;
  • Documents to be signed must be contracts with form fields;
  • The documents to be signed must have as many signature fields as there are participants;
  • All participants sign all documents to be signed;

Web SDK integration

<body>
<div id="form"></div>

<script src="lib/netheos-form.js"></script>
<script>
   NetheosForm.init({
       baseUrl: 'TRUST_AND_SIGN_URL',
       productPublicId: 'PRODUCT_PUBLIC_ID',
       workflowLabel: 'WORKFLOW_LABEL',
       divId: 'form',
       onStepChange: function (step) {
           ...
       },
       onComplete: function (clientFile) {
           ...
       }
   })
</script>
</body>

The form is added to the html page within the tag with ID <div id="form"></div>.

It is possible to define JavaScript callbacks for two types of events.

onStepChange(step)`

This callback is called at each step change by the user. A step has the following structure:

{
    "form": {
        "element": {}, // HTML element representing the form
        "fields": [
            {
                "name": "", // Name of the field
                "element": {}, // HTML element representing the field
                "errors": [] // List of errors in the field (can be FIELD_MISSING, EMAIL_FORMAT, IBAN_FORMAT, SIREN_FORMAT, INVALID_NAME, INVALID_PHONE_NUMBER, INVALID_DATE)
            }
        ],
        "fieldsInError": [], // List of fields in error
        "errors": [] // List of form errors (can be NOT_ENOUGH_PARTICIPANTS, TOO_MANY_PARTICIPANTS)
    }
}

onComplete(clientFile)`

This callback is called when the user submits the form. A client file has the following structure:

{
    "clientFileUuid": "", // UUID of the file
    "accessToken": "", // User access token
    "signbookUrl": "", // URL to the signbook
    "signbookFrontUrl": "" // URL to the signbook's front page
}

To display the signbook, simply include an iframe in your page and set the source to the URL clientFile.signbookUrl?token=clientFile.accessToken.

Documents to be signed

The documents to be signed may contain the information of the participants in the case. The names of the form fields in the contracts to be signed should be named as follows:

  • legalEntity_%s : List of fields for a legal entity
legalEntity_ %s
prefix field type
  • The Field Types for a legal entity are :
Field Description
LEGAL_ENTITY_NAME Name
LEGAL_ENTITY_SIREN Siren
LEGAL_ENTITY_ADDRESS_1 Address line 1
LEGAL_ENTITY_ADDRESS_2 Address line 2
LEGAL_ENTITY_ADDRESS_3 Address line 3
LEGAL_ENTITY_ADDRESS_ZIP_CODE Postcode
LEGAL_ENTITY_ADDRESS_CITY City
LEGAL_ENTITY_IBAN Iban
  • participant_%s_%d_%s`
participant_ %s %d %s
prefix type of participant (in the path) participant type index (Int) field type
  • The Field Types for a participant are :
Field Description
CIVILITY Civility
EMAIL Email
FIRST_NAME First Name
LAST_NAME Surname
BIRTH_NAME Birth name
BIRTH_PLACE City of Birth
BIRTH_DATE Date of birth
POSTAL_ADDRESS_1 Address line 1
Address line 1 POSTAL_ADDRESS_2
POSTAL_ADDRESS_3 Address line 3
POSTAL_ADDRESS_ZIP_CODE Postal Code
POSTAL_ADDRESS_CITY City
POSTAL_ADDRESS_COUNTRY_CODE Country Code
Country Code MOBILE_PHONE
Phone number (mobile) PHONE
IBAN Iban