Last active
December 11, 2015 12:18
-
-
Save soe/4599566 to your computer and use it in GitHub Desktop.
Challenge 2026
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 files (routes/index.js and libs/cloudspokes.js) are changed in refactoring updateMember function. | |
"updateMember" function is modified to accept 1 more param: memberTabs which is retrieved from DocuSign API. | |
Please refer to change log here: https://github.com/soe/Docusign-Embedded-Signing/compare/cs2026 | |
In the following gist (https://gist.github.com/4599566#file-tabs-json-output), "tabs" returned in JSON output from DocuSign API response is included for reference. | |
** Demo: http://docusign-soe.herokuapp.com/sign/a0IZ0000000FyJU/jeffdonthemic/99097A71-5EE0-43DD-A16F-6D0066983910/[email protected] | |
** Screencast: https://vimeo.com/57982065 | |
## tabs to fields mapping | |
Tabs reference: https://gist.github.com/4599566#file-tabs-json-output | |
Code reference: https://github.com/soe/Docusign-Embedded-Signing/compare/cs2026#L0R46 | |
Tabs can be mapped out to member's fields inside if/else block. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"tabs": { | |
"checkboxTabs": [{ | |
"documentId": "1", | |
"pageNumber": "1", | |
"recipientId": "1", | |
"xPosition": "139", | |
"yPosition": "141", | |
"name": "Individual", | |
"requireInitialOnSharedChange": "false", | |
"selected": "true", | |
"shared": "false", | |
"tabLabel": "Classification" | |
}, { | |
"documentId": "1", | |
"pageNumber": "1", | |
"recipientId": "1", | |
"xPosition": "246", | |
"yPosition": "142", | |
"name": "Corporation", | |
"requireInitialOnSharedChange": "false", | |
"selected": "false", | |
"shared": "false", | |
"tabLabel": "Classification" | |
}, { | |
"documentId": "1", | |
"pageNumber": "1", | |
"recipientId": "1", | |
"xPosition": "318", | |
"yPosition": "141", | |
"name": "S Corporation", | |
"requireInitialOnSharedChange": "false", | |
"selected": "false", | |
"shared": "false", | |
"tabLabel": "SCorp" | |
}, { | |
"documentId": "1", | |
"pageNumber": "1", | |
"recipientId": "1", | |
"xPosition": "390", | |
"yPosition": "141", | |
"name": "Partnership", | |
"requireInitialOnSharedChange": "false", | |
"selected": "false", | |
"shared": "false", | |
"tabLabel": "Partnership" | |
}, { | |
"documentId": "1", | |
"pageNumber": "1", | |
"recipientId": "1", | |
"xPosition": "447", | |
"yPosition": "141", | |
"name": "Trust", | |
"requireInitialOnSharedChange": "false", | |
"selected": "false", | |
"shared": "false", | |
"tabLabel": "Trust" | |
}, { | |
"documentId": "1", | |
"pageNumber": "1", | |
"recipientId": "1", | |
"xPosition": "59", | |
"yPosition": "165", | |
"name": "Limited Liability Company", | |
"requireInitialOnSharedChange": "false", | |
"selected": "false", | |
"shared": "false", | |
"tabLabel": "LLc" | |
}, { | |
"documentId": "1", | |
"pageNumber": "1", | |
"recipientId": "1", | |
"xPosition": "59", | |
"yPosition": "189", | |
"name": "Checkbox 11", | |
"requireInitialOnSharedChange": "false", | |
"selected": "false", | |
"shared": "false", | |
"tabLabel": "topmostSubform[0].Page1[0].c1_01[6]" | |
}, { | |
"documentId": "1", | |
"pageNumber": "1", | |
"recipientId": "1", | |
"xPosition": "507", | |
"yPosition": "159", | |
"name": "Tax Exempt", | |
"requireInitialOnSharedChange": "false", | |
"selected": "false", | |
"shared": "false", | |
"tabLabel": "TaxExempt" | |
}], | |
"dateSignedTabs": [{ | |
"documentId": "1", | |
"pageNumber": "1", | |
"recipientId": "1", | |
"xPosition": "411", | |
"yPosition": "510", | |
"tabLabel": "Date Signed", | |
"name": "Date Signed", | |
"value": "2013-01-22T22:27:05.0000000Z" | |
}], | |
"signHereTabs": [{ | |
"documentId": "1", | |
"pageNumber": "1", | |
"recipientId": "1", | |
"xPosition": "130", | |
"yPosition": "478", | |
"name": "Sign Here", | |
"optional": "false", | |
"scaleValue": 1, | |
"tabLabel": "Signature 22" | |
}], | |
"textTabs": [{ | |
"documentId": "1", | |
"pageNumber": "1", | |
"recipientId": "1", | |
"xPosition": "458", | |
"yPosition": "353", | |
"font": "helvetica", | |
"fontSize": "size9", | |
"tabLabel": "EIN2", | |
"concealValueOnDocument": "false", | |
"disableAutoSize": "true", | |
"locked": "false", | |
"maxLength": 7, | |
"name": "Text 1", | |
"required": "false", | |
"value": "0000000", | |
"width": 42, | |
"requireInitialOnSharedChange": "false", | |
"shared": "false", | |
"validationMessage": "", | |
"validationPattern": "", | |
"height": 11 | |
}, { | |
"documentId": "1", | |
"pageNumber": "1", | |
"recipientId": "1", | |
"xPosition": "55", | |
"yPosition": "94", | |
"font": "helvetica", | |
"fontSize": "size9", | |
"tabLabel": "Name", | |
"concealValueOnDocument": "false", | |
"disableAutoSize": "false", | |
"locked": "false", | |
"name": "Your name", | |
"required": "true", | |
"value": "soe", | |
"width": 576, | |
"requireInitialOnSharedChange": "false", | |
"shared": "false", | |
"validationMessage": "", | |
"validationPattern": "", | |
"height": 11 | |
}, { | |
"documentId": "1", | |
"pageNumber": "1", | |
"recipientId": "1", | |
"xPosition": "55", | |
"yPosition": "118", | |
"font": "helvetica", | |
"fontSize": "size9", | |
"tabLabel": "BusinessName", | |
"concealValueOnDocument": "false", | |
"disableAutoSize": "false", | |
"locked": "false", | |
"name": "Business Name if different from above", | |
"required": "false", | |
"value": "soe", | |
"width": 576, | |
"requireInitialOnSharedChange": "false", | |
"shared": "false", | |
"validationMessage": "", | |
"validationPattern": "", | |
"height": 11 | |
}, { | |
"documentId": "1", | |
"pageNumber": "1", | |
"recipientId": "1", | |
"xPosition": "55", | |
"yPosition": "214", | |
"font": "helvetica", | |
"fontSize": "size9", | |
"tabLabel": "Address", | |
"concealValueOnDocument": "false", | |
"disableAutoSize": "false", | |
"locked": "false", | |
"name": "Address", | |
"required": "true", | |
"value": "address", | |
"width": 360, | |
"requireInitialOnSharedChange": "false", | |
"shared": "false", | |
"validationMessage": "", | |
"validationPattern": "", | |
"height": 11 | |
}, { | |
"documentId": "1", | |
"pageNumber": "1", | |
"recipientId": "1", | |
"xPosition": "55", | |
"yPosition": "237", | |
"font": "helvetica", | |
"fontSize": "size9", | |
"tabLabel": "CityStateZip", | |
"concealValueOnDocument": "false", | |
"disableAutoSize": "false", | |
"locked": "false", | |
"name": "City State and Zip", | |
"required": "true", | |
"value": "city", | |
"width": 360, | |
"requireInitialOnSharedChange": "false", | |
"shared": "false", | |
"validationMessage": "", | |
"validationPattern": "", | |
"height": 11 | |
}, { | |
"documentId": "1", | |
"pageNumber": "1", | |
"recipientId": "1", | |
"xPosition": "386", | |
"yPosition": "213", | |
"font": "helvetica", | |
"fontSize": "size9", | |
"tabLabel": "NameAndAddress", | |
"concealValueOnDocument": "false", | |
"disableAutoSize": "true", | |
"locked": "false", | |
"name": "Text 16", | |
"required": "false", | |
"value": "optional", | |
"width": 198, | |
"requireInitialOnSharedChange": "false", | |
"shared": "false", | |
"validationMessage": "", | |
"validationPattern": "", | |
"height": 44 | |
}, { | |
"documentId": "1", | |
"pageNumber": "1", | |
"recipientId": "1", | |
"xPosition": "55", | |
"yPosition": "262", | |
"font": "helvetica", | |
"fontSize": "size9", | |
"tabLabel": "AccountNumbers", | |
"concealValueOnDocument": "false", | |
"disableAutoSize": "false", | |
"locked": "false", | |
"name": "Optional account numbers", | |
"required": "false", | |
"value": "optional", | |
"width": 576, | |
"requireInitialOnSharedChange": "false", | |
"shared": "false", | |
"validationMessage": "", | |
"validationPattern": "", | |
"height": 11 | |
}, { | |
"documentId": "1", | |
"pageNumber": "1", | |
"recipientId": "1", | |
"xPosition": "415", | |
"yPosition": "306", | |
"font": "helvetica", | |
"fontSize": "size9", | |
"tabLabel": "SSNFirst3", | |
"concealValueOnDocument": "false", | |
"disableAutoSize": "true", | |
"locked": "false", | |
"maxLength": 3, | |
"name": "Social Security Number", | |
"required": "true", | |
"value": "111", | |
"width": 18, | |
"requireInitialOnSharedChange": "false", | |
"shared": "false", | |
"validationMessage": "", | |
"validationPattern": "", | |
"height": 11 | |
}, { | |
"documentId": "1", | |
"pageNumber": "1", | |
"recipientId": "1", | |
"xPosition": "472", | |
"yPosition": "306", | |
"font": "helvetica", | |
"fontSize": "size9", | |
"tabLabel": "SSNSecond2", | |
"concealValueOnDocument": "false", | |
"disableAutoSize": "true", | |
"locked": "false", | |
"maxLength": 2, | |
"name": "Social Security Number", | |
"required": "true", | |
"value": "11", | |
"width": 6, | |
"requireInitialOnSharedChange": "false", | |
"shared": "false", | |
"validationMessage": "", | |
"validationPattern": "", | |
"height": 11 | |
}, { | |
"documentId": "1", | |
"pageNumber": "1", | |
"recipientId": "1", | |
"xPosition": "516", | |
"yPosition": "304", | |
"font": "helvetica", | |
"fontSize": "size9", | |
"tabLabel": "SSNLast3", | |
"concealValueOnDocument": "false", | |
"disableAutoSize": "true", | |
"locked": "false", | |
"maxLength": 4, | |
"name": "Social Security Number", | |
"required": "true", | |
"value": "1111", | |
"width": 18, | |
"requireInitialOnSharedChange": "false", | |
"shared": "false", | |
"validationMessage": "", | |
"validationPattern": "", | |
"height": 11 | |
}, { | |
"documentId": "1", | |
"pageNumber": "1", | |
"recipientId": "1", | |
"xPosition": "415", | |
"yPosition": "353", | |
"font": "helvetica", | |
"fontSize": "size9", | |
"tabLabel": "EIN1", | |
"concealValueOnDocument": "false", | |
"disableAutoSize": "true", | |
"locked": "false", | |
"maxLength": 2, | |
"name": "Text 21", | |
"required": "false", | |
"value": "00", | |
"width": 6, | |
"requireInitialOnSharedChange": "false", | |
"shared": "false", | |
"validationMessage": "", | |
"validationPattern": "", | |
"height": 11 | |
}, { | |
"documentId": "1", | |
"pageNumber": "1", | |
"recipientId": "1", | |
"xPosition": "251", | |
"yPosition": "509", | |
"tabLabel": "Username", | |
"concealValueOnDocument": "false", | |
"disableAutoSize": "false", | |
"locked": "false", | |
"name": "Please enter your CloudSpokes Username", | |
"required": "true", | |
"value": "soe", | |
"width": 120, | |
"requireInitialOnSharedChange": "false", | |
"shared": "false", | |
"validationMessage": "", | |
"validationPattern": "", | |
"height": 11 | |
}, { | |
"documentId": "1", | |
"pageNumber": "1", | |
"recipientId": "1", | |
"xPosition": "412", | |
"yPosition": "166", | |
"font": "helvetica", | |
"fontSize": "size9", | |
"tabLabel": "TaxClassifaction", | |
"concealValueOnDocument": "false", | |
"disableAutoSize": "true", | |
"locked": "false", | |
"maxLength": 1, | |
"name": "Tax Classification", | |
"required": "false", | |
"value": "", | |
"width": 6, | |
"requireInitialOnSharedChange": "false", | |
"shared": "false", | |
"validationMessage": "", | |
"validationPattern": "", | |
"height": 11 | |
}, { | |
"documentId": "1", | |
"pageNumber": "1", | |
"recipientId": "1", | |
"xPosition": "163", | |
"yPosition": "190", | |
"font": "helvetica", | |
"fontSize": "size9", | |
"tabLabel": "topmostSubform[0].Page1[0].f1_50_0_[0]", | |
"concealValueOnDocument": "false", | |
"disableAutoSize": "false", | |
"locked": "false", | |
"name": "Text 12", | |
"required": "false", | |
"value": "", | |
"width": 378, | |
"requireInitialOnSharedChange": "false", | |
"shared": "false", | |
"validationMessage": "", | |
"validationPattern": "", | |
"height": 11 | |
}] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment