Customizing The Behavior
Code vs Management Portal
You can customize the behavior of the library directly in the code or in the The ToughClicks Management Portal. For more information about how to do that, see Managing Packets.
Any settings set in your code will take precedence over any settings in the Management Portal. This is done to ensure there are no unintended consequences of configuration changes in the web app.
To customize the behavior in the code, you must set the Display Options after you have initialized the library.
Display Options
The options object must contain three key-value pairs.
Required Fields:
containerId
- this is the HTML id of the container you want ToughClicks to render within.displayMethod
- this setting controls how we display the agreement checkboxes. See Display Method below.
One of the following, but never both:
signerIdSelector
- this is the form field id that the Signer will enter their unique identifier into. For example, this may be an email input. ToughClicks will listen to changes in this field to populate the Signer identifier.signerId
- if you want to supply a Signer identifier directly to ToughClicks. Often if you are using a UUID or the integration occurs after a Signer has signed in and you are not asking them to enter their identifying information into a form.
If you are using the signers UUID, we recommend also setting their email address to make it easier to search in the ToughClicks dashboard. See Signer Identifiers & Email Address for more information.
Optional Fields
shouldOpenModal
- this is a boolean that dictates if the Terms of a Document should open in a new tab or in a modal. You can customize the modal's look and feel. See CSS Customization.manualAcceptance
- this is a boolean that dictates if the user's Acceptance should be automatically created. See Manual Acceptancefor more information.
Display Method
This setting controls how the Terms are displayed to the user and what actions they must perform to agree to the terms.
Valid Options
Scroll
- this will show the terms of each Document in a discrete scrollable container along with a checkbox for each Document. The checkbox is disabled until the user scrolls to the bottom of the terms.
Individual
- this will show a checkbox for each Document in your Packet. The user must check all the boxes to create the Acceptance. Each action by the user is a discrete agreement to each document's Terms.
Group
- this will show a single checkbox for the entire Packet. The user must check the one box signaling their agreement to all the Documents at one time.
Updated 10 days ago