rahmat
rahmat

Reputation: 1757

How to setup docusign as this example?

I'm using PHP. My friends gave me this sample of docusign http://loancosample.azurewebsites.net but he forget where he get it from. Basically, it show that docusign is able to combine user input with a PDF file. Then ask user to sign it.

I've read through this https://www.docusign.com/developer-center/quick-start/request-signatures

But still can't find any solutions. What should I do to built this feature on my website?

Thanks.

Upvotes: 0

Views: 297

Answers (2)

Ergin
Ergin

Reputation: 9356

From the DocuSign Developer Center under the Quick Start section there is the API Tools page. The first two tools listed are the API Explorer and the API Walkthroughs. Both are great tools that you should familiarize yourself with.

In the API Walkthroughs you'll see there are 9 of the most common API scenarios listed, each with sample code in 6 different languages including PHP. The bottom three API Walkthroughs focused on Embedding functionality, which is what the LoanCo sample you've referenced uses. With Embedding, instead of sending an email notification to start signing your app or website can generate a URL token for signing, then you just navigate your user there in your app for them to sign.

Try copying the code for the Embedded Signing walkthrough and using that in your project. NOTE: That sample sends a request from a Template in your account. If you do not want to use a template but want to use a local document instead then look at the Request Signature on Document walkthrough and use that to create your envelope.

As for populating the data fields, in the JSON of your request body for creating the envelope you just need to provide values for the tabs, using their tabLabel to indicate which tab (ie name) and the value property to assign an actual value. Take a look at this SO post for more info on that:

Docusign: Dynamically Populate Fields In Document

Upvotes: 1

Jeff Kyllo
Jeff Kyllo

Reputation: 698

You'll likely want to use "composite templates" and use the transformPdfFormFields property to have DocuSign automatically create DocuSign secure fields from the PDF. Each of these should become addressable by name so that you can provide values in your API call. I don't have a specific example off hand, but that's the right direction!

Upvotes: 1

Related Questions