Skip to content
This repository was archived by the owner on Oct 17, 2023. It is now read-only.
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion hellosign_sdk/hsclient.py
Original file line number Diff line number Diff line change
Expand Up @@ -2116,7 +2116,8 @@ def _send_signature_request_with_template(self, test_mode=False, client_id=None,
"message": message,
"signing_redirect_url": signing_redirect_url,
"allow_decline": self._boolean(allow_decline),
"signing_options": HSFormat.format_json_data(signing_options)
"signing_options": HSFormat.format_json_data(signing_options),
"custom_fields": HSFormat.format_json_data(custom_fields)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@oconnor-sn adding custom fields here will not solve the problem. In fact the custom fields are being added to the request data (see line 2134).

To make custom fields support name, value, editor, required you'd need to look into this function:
format_custom_fields defined in hsformat.py.

Please share with me the python example you have when testing this. I want to make sure you have a good request example so you can correctly test this. Feel free to send it over slack or here and remember to not include your api key in it.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks @martinytodorov - I will send via slack.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @oconnor-sn, here's the problem:
We have customers that are using the custom fields with their old syntax. If you see the function I am pointing you at (format_custom_fields) you will see that the expected format is custom_fields=[{'fieldid1':'somevalue1', 'fieldid2':'somevalue2'}]

Your fix should not be introducing a new breaking change. See your example changed here for 2 roles and 2 types of custom fields syntaxes. Both syntaxes should work:
https://gist.github.com/martinytodorov/d3bf0021d7d3e1952811fcedf44b6046


}

Expand Down