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

Add Editable Merge Fields support #30

Closed
rmelencio opened this issue Jan 29, 2016 · 4 comments
Closed

Add Editable Merge Fields support #30

rmelencio opened this issue Jan 29, 2016 · 4 comments

Comments

@rmelencio
Copy link

When updating the SDKs to include editable merge fields, please also update the SDK git repos README examples (if necessary) and the following in the API docs:

  • "Send with Template" endpoint example
  • "Send Embedded Signature Request with Template" endpoint example
  • Templates Walkthrough
  • Signature Request Walkthrough -> Using Templates
@ketan37dm
Copy link

I am also facing this issue at the moment.
Following is the way I tried to insert the editable merge fields -

custom_fields: [ { name: 'first_name', value: current_user.first_name.capitalize, editor: 'Engineer', required: true}, { name: 'email', value: current_user.email, editor: 'Engineer', required: true } ]

To this, I got the following error -
Server responded with code 400 Request URI: https://api.hellosign.com/v3/signature_request/create_embedded_with_template Message: {"error":{"error_msg":"Invalid custom field: 1","error_name":"bad_request"}}

I read the docs and the code to find no examples for this. Kindly respond back soon about this issue. If there is a workaround to this, please post here. Thank you.

@rmelencio
Copy link
Author

Hi,

Thanks for your request. We are getting this into our queue and will provide you with an update.

-Ronald

@renderf0x
Copy link
Contributor

Heya @ketan37dm - this should be ready to go now, as of v3.2.8 of the SDK, which I've just pushed here and to Rubygems.

You can now specify custom_fields as you have above, as an array of (Hash) objects.

Note that you must have custom_fields of the same name (API label) in the template you're using to send the request as well.

For an example reference, this is what I used to verify the fix:

res = client.send_signature_request_with_template(
    :test_mode => 1,
    :template_id => "bd925f9abf7edec3b8fb957aacfc605cfe9511ab",
    :subject => 'Purchase Order',
    :message => 'Glad we could come to an agreement.',
    :signers => [
        {
            :email_address => 'test@example.com',
            :name => 'George',
            :role => 'Client'
        }
    ],
    :custom_fields => [ { name: 'first_name', value: "someValue", editor: 'Client', required: true}, { name: 'email', value: "hodor@example.com", editor: 'Client', required: true } ]
)

puts res.data

@ketan37dm
Copy link

thank you @renderf0x @rmelencio I appreciate your quick response guys 👍

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants