Articles in this section
Category / Section

Restrict sending and enable draft saving for embedded requests

Published:
2 mins read

If you want to restrict users of your application to sending documents and instead only allow them to save the document in the Draft state, BoldSign provides the capability to customize toolbars for embedded requests. This enables you to hide the Send button and display only the Save button.

Follow these steps to seamlessly restrict sending and allow saving documents in drafts for embedded requests

1. Customize UI for embed document request

In your application, create a user interface (UI) that allows users to input relevant information for the embedded document request. This information will be used to create the document.

For instance, collect user inputs for the following parameters:

  • Title
  • Message
  • Signers and more

However, when it comes to the parameters of the embedded send toolbars (e.g., ShowToolbar, ShowSaveButton, SendViewOption, etc.), it’s important not to gather information from users. Instead, these parameters should already be predetermined within your application to restrict sending and to permit the saving of documents as drafts.

Here are example codes that demonstrate how to create an embedded document.

Code snippet

curl -X POST 'https://api.boldsign.com/v1/document/createEmbeddedRequestUrl' \
   -H 'X-API-KEY: {your API key}' \
   -F 'Title=Sent from API Curl' \
   -F 'ShowToolbar=true' \
   -F 'ShowNavigationButtons=true' \
   -F 'ShowPreviewButton=true' \
   -F 'ShowSendButton=false' \
   -F 'ShowSaveButton=true' \
   -F 'SendViewOption=PreparePage' \
   -F 'ShowTooltip=false' \
   -F 'Locale=EN' \
   -F 'Message=This is document message sent from API Curl' \
   -F 'EnableSigningOrder=false' \
   -F 'Signers[0][Name]=Signer Name 1' \
   -F 'Signers[0][EmailAddress]=alexgayle@cubeflakes.com' \
   -F 'Files=@{Your file Path};type=application/pdf'

In the provided example, replace placeholders (Title, Message, etc.) with actual input values gathered from your application’s UI. If your application supports multiple signers, tailor the UI accordingly. Adjust values within the Signers array to match your custom signers.

To restrict users from sending and allow them to save documents in drafts, set the button options (ShowSaveButton to true and ShowSendButton to false) in the cURL request.

Executing the provided code will generate an embed link, and the document will be saved in draft status within your BoldSign account.

2. Utilize the generated link in an iFrame

Once the embed link is generated, integrate it into an iFrame within your application. This iFrame enables your application users to:

  • Add extra signers
  • Upload additional documents
  • Configure form fields

However, users will not be able to send the document to the signer; they can only save the document in draft status.

Was this article useful?
Like
Dislike
Help us improve this page
Please provide feedback or comments
Access denied
Access denied