Creating template that can be signed within iframe

Hi,

We need following workflow. Every year we have to create new contract template that our users have to sign. Template has client specific values in the text (fields in terms of Word document). When user activates signing in our application (Ruby on Rails) we have to fill in these values from our database and then open it in an iframe so client can sign it. Upon opening filled in values must not be changed by the client so only signature field is the one to be filled in.

I was browsing and searching through the documentation for last couple days and cannot find a way to implement this. Can you, please, tell me if this is possible and if it is what is exact procedure (from creating template with fields that we can fill in but client cannot change) till signing such document?

Sincerely,


Hello,

Thank you for your inquiry.

You can investigate our demo example for how to dynamically create a signature form using data from the HTML form via this link, in the same way you can use envelope instead the form . The principle of the example is in the creating HTML form with required fields on your website for user info, that then will be added to the envelope or to the form via our Ruby SDK . The code of the demo example you will find in the documentation that attached to it.

If you will have more questions please feel free to contact us.

----------

Best regards,
Evgen Efimov

http://groupdocs.com
Your Document Collaboration APIs
Follow us on LinkedIn, Twitter, Facebook and Google+

Hello,


From sample link it is not clear what document GUID should be used in the form so I was not able to test it. How can I find GUID that should be used? Does this sample open document so user can see and sign it?

Sincerely,
Martijn
Hello Martjn,

The document GUID will be available after template uploading to our service . For how to get the document GUID please investigate this documentation . In our demo example we have attached the document example it is a .docx file that contains merge fields , you should create your contract in the same way and then our API will recognize the fields and will be able to fill them.

If you will have more questions please feel free to contact us.

----------

Best regards,
Evgen Efimov

http://groupdocs.com
Your Document Collaboration APIs
Follow us on LinkedIn, Twitter, Facebook and Google+

Hi Evegen,


Thank you for your quick responses.

I have uploaded document from the example to our ‘templates’ folder, got proper GUID and submitted request but I got following error:

“No fields for recipients that can sign in the envelope”

Looking at the Ruby sample code I noticed that signature field is not added which results in this error. I’ve tried to add signature field by adding following code below line 183 from your Ruby sample (https://github.com/groupdocs-total/groupdocs-ruby/blob/master/examples/api-samples/samples/sample31.rb#L183):

field = GroupDocs::Signature::Field.get!.detect { |f| f.type == :signature }
field.location = { location_x: 0.3, location_y: 0.3, page: 1 }
envelope.add_field! field, document, recipient

But I got new error: “Unknown document”.

Can you tell me how can I add signature field so user can finally sign document through your site opened in iframe?

Regards,
Martijn

Hello,

Thank you for coming back.

Try to get the document from the envelope , before you will add signature field to it, via this code

document = envelope.documents!({})

This code will revert an array of documents, so you will need to add next code to create signature field

field = GroupDocs::Signature::Field.get!({}).detect { |f| f.type == :signature }
field.location = {:location_x => 0.15, :location_y => 0.73, :location_w => 150, :location_h => 50, :page => 1}
field.name = 'EMPLOYEE SIGNATURE'
envelope.add_field!(field, document[0], recipient, {})

If this will not help you then please share with us a full code of your example.

We will wait for your details.


--------------------

Best regards,
Evgen Efimov

http://groupdocs.com
Your Document Collaboration APIs
Follow us on LinkedIn, Twitter, Facebook and Google+

Hello Evgen,


Thanks a lot for your help. Signing is now passing without errors.

Sincerely,
Martijn

You are welcome. If you will have more questions please feel free to contact us.


---------

Best regards,

Evgen Efimov


http://groupdocs.com
Your Document Collaboration APIs
Follow us on LinkedIn, Twitter, Facebook and Google+