-
Notifications
You must be signed in to change notification settings - Fork 48
Add support for custom_fields editor and required fields #21
Comments
In order to understand this SDK issue one must be able to create a template and setup custom fields. Custom fields are text boxes that have the value 'ME WHEN SENDING' and then in the code when you call the signature request, you should be able to pass the value to the custom field.
name: the name, or "Field Label," of the custom field (the field's API ID can be used here as well)
which is basically saying, pass the value of $20,000 to the custom field named Cost. DESIRED RESULTS Also, if there are multiple custom fields, this should be supported |
@alexmac05 @martinytodorov - change has been made and tested but dependant on PR 61 so will wait till this PR is merged before I commit these changes |
Ref: New PR created with code change and unit test completed: |
Currently the python SDK does not support
'custom_fields': '[{"name":"newline", "value":"$20,000", "editor":"Client", "required":true}]',
the editor and required fields for custom_fields. Please add this support.
The python SDK will work for templates and custom fields, but not in the case where you want to assign an editor or make it required.
Workaround:
import requests
buildTheRequest = 'https://' + apikey + ':@api.hellosign.com/v3/signature_request/create_embedded_with_template'
data = {
'client_id': 'YOUR_CLIENT_ID',
'template_id': 'YOUR_TEMPLATE_ID',
'subject': 'ticket214090',
'message': 'ticket214090',
'signers[Client][name]': 'George',
'signers[Client][email_address]':'YOUR_EMAIL',
'custom_fields': '[{"name":"newline", "value":"$20,000", "editor":"Client", "required":true}]',
'test_mode': '1'
}
print(buildTheRequest)
r = requests.post(buildTheRequest, data)
print(r.text)
The text was updated successfully, but these errors were encountered: