Prefill widgets not working
If there's a way to troubleshoot this, please point me in the right direction. But I'm trying to create a document from a template through the API, and while doc creation succeeds and I get the email to sign the document, the widget prefills aren't being applied to the document. Just let me know what information I can provide to help, thanks.
-Chris
Textbox widgets not prefilling; does anyone have a solution?
4 fields included and named appropriately
Document is created successfully but no fields are prefilled
Suggested prefill format for textbox which is being used down below:
Success response to show that the document is being created, but textboxes are not prefilling:
Body that is being sent:
{ "title": "RobTest", "description": null, "signers": [ { "role": "Student", "phone": "", "name": "Thomas (Tommy) K Teststudent", "company": "", "job_title": "", "email": "[email protected]" } ], "send_email": false, "prefill": { "widgets": [ {"name": "Student_LName", "response": "LenkTest"}, {"name": "Student_FName", "response": "RobTest"}, {"name": "StudentId", "response": "49974997"}, {"name": "Student_MName", "response": "Jassonn"} ] } }
A slightly different version that has been attempted:
{ "title": "RobTest", "description": null, "signers": [ { "role": "Student", "phone": "", "name": "Thomas (Tommy) K Teststudent", "company": "", "job_title": "", "email": "[email protected]" } ], "sendInOrder": true, "sendEmail": true, "folderId": "", "email_subject": "Please sign the attached document", "allow_modifications": false, "prefill": { "widgets": [ { "name": "StudentId", "options": { "response": "660089186" }, "type": "textbox", "response": "660089186", "page": 1 }, { "name": "Student_FName", "options": { "response": "Thomas" }, "type": "textbox", "response": "Thomas", "page": 1 }, { "name": "Student_MName", "options": { "response": "K" }, "type": "textbox", "response": "K", "page": 1 }, { "name": "Student_LName", "options": { "response": "Teststudent" }, "type": "textbox", "response": "Teststudent", "page": 1 } ] } }
i've even tried to documentation format the define the pixels using the pixel debugger and still no luck on prefilling fields, or creating them and prefilling them in those locations.
Seems that prefilling textboxes that are set in predetermined places and are set with a predetermined name are not supported in the cloud version?
This is standard with docusign, adobe sign, panda docs, hello sign, and others.
Will this be supported soon?
I have about 40 universities (for about 600,000-800,000 documents a year) who are wanting to use this function to drop docusign to use the cloud hosted version, but without this functionality this seems like a dead end on this software.
I've also tried with defining the location as well with no luck.
{ "title": "RobTest", "description": null, "signers": [ { "role": "Student", "phone": "", "name": "Thomas (Tommy) K Teststudent", "company": "", "job_title": "", "email": "[email protected]" } ], "send_email": false, "prefill": { "widgets": [ { "type": "textbox", "page": 1, "x": 99, "y": 263, "w": 111, "h": 19, "options": { "name": "Student_LName", "response": "LenkTest" } }, { "type": "textbox", "page": 1, "x": 263, "y": 261, "w": 132, "h": 22, "options": { "name": "Student_FName", "response": "RobTest" } }, { "type": "textbox", "page": 1, "x": 481, "y": 264, "w": 80, "h": 17, "options": { "name": "StudentId", "response": "49974997" } }, { "type": "textbox", "page": 1, "x": 88, "y": 293, "w": 221, "h": 21, "options": { "name": "Student_MName", "response": "Jassonn" } } ] } }
The mistake here is that you’re adding the widget for the student role in the Create Template API, and then trying to use it as a prefill field in the Create Document from Template API. You need to update your Create Template like this: { "file": "",
"title": "Create template", "note": "Create template sample Note", "description": "sample Description", "signers": [ { "role": "Student", "email": "", "name": "", "phone": "", "widgets": [ { "type": "signature", "page": 1, "x": 244, "y": 71, "w": 38, "h": 46 }, { "type": "textbox", "page": 1, "x": 327, "y": 380, "w": 114, "h": 21, "options": { "name": "textbox", "required": true, "readonly": false, "default": "", "hint": "provide address", "regularexpression": "", "color": "black", "fontsize": 12 } } ] }
],"prefill": { "widgets": [ { "type": "textbox", "page": 1, "x": 100, "y": 30, "w": 100, "h": 80, "options": { "name": "Student_LName", "response": "Teststudent", "color": "red", "fontsize": 12 } }, { "type": "textbox", "page": 1, "x": 100, "y": 100, "w": 60, "h": 80, "options": { "name": "Student_FName", "response": "Thomas", "color": "red", "fontsize": 12 } }, { "type": "textbox", "page": 1, "x": 100, "y": 150, "w": 100, "h": 80, "options": { "name": "StudentId", "response": "660089186", "color": "red", "fontsize": 12 } },{ "type": "textbox", "page": 1, "x": 100, "y": 200, "w": 100, "h": 80, "options": { "name": "Student_MName", "response": "K", "color": "red", "fontsize": 12 } } ] }, "sendInOrder": true, "enableOTP": false, "enableTour": false, "redirect_url": "", "sender_name": "opensign™", "sender_email": "[email protected]", "allow_modifications": false }
Create document from template
{
"signers": [
{
"role": "Student",
"email": "[email protected]",
"name": "Thomas (Tommy) K Teststudent",
"phone": "",
"widgets": [
{
}
]
}
],
"prefill": {
"widgets": [
{
"name":"Student_LName",
"response":"LenkTest"},
{
"name":"Student_FName",
"response":"Thomas"
},
{
"name":"Student_MName",
"response":"K"
},
{
"name":"StudentId",
"response":"660089186"
}
]
},
"folderId": "",
"send_email": true,
"email_subject": "",
"email_body": "",
"sendInOrder": true,
"timeToCompleteDays": 15,
"enableOTP": true,
"enableTour": false,
"sender_name": "opensign™",
"sender_email": "[email protected]",
"allow_modifications": true,
"file": "",
"auto_reminder": false,
"remind_once_in_every": 5
}
@pravinOpenSign
So, are you saying that the template has to be created through the API first instead of the template that was created UI in order to be pre-filled by the API?
Using your example request above I'm still not getting prefilled information from a template created in the UI.
I've also tried to setup the PreFill by owner:
But receive that the field has already been prefilled
If input a textbox from the Role, the API does generate an error message and the document is created, but it's not prefilling the data defined in the API request.
I've also now created a simple template through the API (not the UI) with the "Create template" code above and it prefilled with the example value of Thomas which I did send over:
But then when I go to create a new document from this template with this 1 field listed on the template created by the API. It does not update from the original template prefill of "Thomas".
"name": "Student_FName",
"response": "LenkTest"
The field created by the API (Student_FName) if I then blank it out to attempt to populate with a new custom value upon document creation
I receive the following error saying it's already been pre-filled, when it has not been.
The end result we are trying to accomplish here is that we are trying to dynamically have fields prefill that are created from our software for different clients (students) who use our software. It seems with this method, you have to create a template (instead of a document) for every single request that is sent over, instead of reusing a template for each document that needs to be signed with the individual's name who needs to sign it.
For example, if we send over Robert as the first name, Robert will appear when the document is created from the existing template. If we send over Chris as the first name, Chris will populate as the first name field, and so on.
The functionality in DocuSign is that you add a textbox on the form in the UI, you define the name of that textbox like in the UI; then in the API request you define the textbox name and the response value, and when the document is created by the template it's prefilled with that request value upon creation of the document from the template.
Response set to: Robert = The textbox with the name Student_FName should be filled in with Robert Response set to: Chris = The textbox with the name Student_FName should be filled in with Chris
The template textbox should not be hardcoded to Robert or Chris in this specific use case?
It was a bug after-all it seems and we are now able to prefill widgets.