Skip to content
This repository was archived by the owner on Oct 17, 2023. It is now read-only.

Editable custom fields #21 - #69

Closed
oconnor-sn wants to merge 1 commit into
hellosign:v3from
oconnor-sn:v3
Closed

Editable custom fields #21#69
oconnor-sn wants to merge 1 commit into
hellosign:v3from
oconnor-sn:v3

Conversation

@oconnor-sn

Copy link
Copy Markdown
Contributor

Change made as per Issue #21.
Code changed in _send_signature_request_with_template

(shared logic between send_signature_request_with_template
and send_signature_request_embedded_with_template)

Please review @martinytodorov and revert with any issues.

Comment thread hellosign_sdk/hsclient.py
"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

@jtreminio-dropbox jtreminio-dropbox added the legacy Related to legacy, non-OpenAPI SDK label Apr 5, 2022
@CLAassistant

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@jtreminio-dropbox

Copy link
Copy Markdown
Contributor

Please use the new OpenAPI SDK: https://pypi.org/project/dropbox-sign/

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

legacy Related to legacy, non-OpenAPI SDK

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants