Code Monkey home page Code Monkey logo

Comments (4)

ketan37dm avatar ketan37dm commented on August 11, 2024

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.

from hellosign-ruby-sdk.

rmelencio avatar rmelencio commented on August 11, 2024

Hi,

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

-Ronald

from hellosign-ruby-sdk.

renderf0x avatar renderf0x commented on August 11, 2024

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 => '[email protected]',
            :name => 'George',
            :role => 'Client'
        }
    ],
    :custom_fields => [ { name: 'first_name', value: "someValue", editor: 'Client', required: true}, { name: 'email', value: "[email protected]", editor: 'Client', required: true } ]
)

puts res.data

from hellosign-ruby-sdk.

ketan37dm avatar ketan37dm commented on August 11, 2024

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

from hellosign-ruby-sdk.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.