baradmahendra | Posts: 11

layout updation by data of system

0 votes
Hi Team, We are able to successfully upload a single document while creating a package . also apply layout on that document which we have create on e-signlive As per or client requirement we need to set the signer on layout and also set some textfield value from our system to e-silanis document on layout and signer can change that value so can you please provide json for that request ?? and also we need to get status and changed value of signer on layout so is it posible to get changed data by signer ?? can you please describe me the proper step to do that?? thanks

Approved Answer
mwilliams | Posts: 957

Reply to: layout updation by data of system

1 votes
I've been in meetings all week, but thought I'd get a little to you, before the weekend. I was able to successfully change the signer in python, with this:
myurl = esign_url + '/packages/' + pkgId + '/roles/' + rId
    signerJSON = {"role": "",
                  "locked": True,
                  "signers": [{"email":"[email protected]",
                  "firstName":"FName",
                  "lastName":"LName"}]
                  }
    
    newSigner_data = json.dumps(signerJSON)
    p = requests.put(myurl,data=newSigner_data,\
                      headers={'Content-Type':'application/json',"Authorization" : apiKey})
where pkgId is the packageId and rId is the roleId of the current package To update the field value for that signer, you'll need to get the approvals from the document and update a field attached to an approval. Look at this: http://docs.e-signlive.com/doku.php?id=esl:api:e-signlive_approvals#put_packages_packageid_documents_documentid_approvals_approvalid_fields_fieldid As for getting the value, later. You'd just need to grab the signature from the completed package and access the bound fields to get the value the signer changed that value to. I will look at it on Monday and provide more detail on the last two, if you weren't able to get it working. :) Have a great weekend.

mwilliams | Posts: 957

Reply to: layout updation by data of system

1 votes
So, after creating a document package with a layout, you want to be able to change the signer information on the package and include default text in a text field that was placed using the layout? Is this correct?

baradmahendra | Posts: 11

Reply to: layout updation by data of system

0 votes
yes exactly , and also want the modified fields value . Thanks

baradmahendra | Posts: 11

Reply to: layout updation by data of system

0 votes
thanks for response, I have understand the roles and updation of signer data can you provide more info regarding getting approval id and putting value of fields which may be changed by signer. the main Think is how to aatach new approval field with layout fields?? thank

baradmahendra | Posts: 11

Reply to: layout updation by data of system

0 votes
and how to setup default value for layout applied input fields like name etc.. and also how to get fieldsId of layout custom fields.

mwilliams | Posts: 957

Reply to: layout updation by data of system

0 votes
Sorry. I missed the email notification of your response. I'll take a look, soon. Most likely, this afternoon.

mwilliams | Posts: 957

Reply to: layout updation by data of system

1 votes
To add a text field to an approval and set a default value, after applying your layout, you'd just need to do something like:
myurl = esign_url + '/packages/' + pkgId + '/documents/' + docId + "/approvals/" + approvalId + "/fields"
    signerJSON = {
                  "name":"",
                  "data":{},
                  "top":500,
                  "left":300,
                  "width":100,
                  "height":30,
                  "page":0,
                  "type":"INPUT",
                  "value":"My custom default value",
                  "subtype":"TEXTAREA"
                  }
    
    clone_data = json.dumps(signerJSON)
    p = requests.post(myurl,data=clone_data,\
                      headers={'Content-Type':'application/json',"Authorization" : apiKey})
To do an update to an existing field, you'd just need to know the field id. To find this, you'd likely need to loop through the fields tied to your approval and find the field with the appropriate "name". The url used would be like: /packages/{packageId}/documents/{documentId}/approvals/{approvalId}/fields/{fieldId} And it would be a PUT vs a POST. Hopefully I'm answering the question properly. Let me know if I've misunderstood.

dharmraj | Posts: 6

Reply to: layout updation by data of system

0 votes
Hie there, It would be great if you can you provide the json format to add a radio field to an approval. Say for example I have field of age groups (like below 11, 11 to 20, 21 to 30, above 30). I want to select 11 to 20 by default in our example. How can I pass the values into json ? I found that probably I will need to provide radio group but I don't know what is the json key for that and also don't know what should be passed into "value" to select a particular option among radio group. To visualize how my group will look like , here is the link to sample image : http://i.imgur.com/1ar7jyQ.png I also want to know the format of a json for checking a simple checkbox(check box should be checked or un-checked based on a condition). Example piece of json I tried is :

{
                    "page":0,
                    "subtype":"CHECKBOX",
                    "width":20,
                    "binding":None,
                    "extract":False,
                    "extractAnchor":None,
                    "left":18,
                    "top":933,
                    "validation":None,
                    "height":20,
                    "data":None,
                    "name": "receive_future_conmmunication",
                    "type":"INPUT",
                    "value":"True" if condition == True else "False"
                }
Thanks.

dharmraj | Posts: 6

Reply to: layout updation by data of system

0 votes
Found the solution for check-box. Still don't know about radio buttons. Can you provide format for a group of radio button with one of them selected ?

mwilliams | Posts: 957

Reply to: layout updation by data of system

0 votes
Great to hear that you found the solution for the check-box. I have a meeting right now, but will look at the radio button issue immediately after.

mwilliams | Posts: 957

Reply to: layout updation by data of system

2 votes
Sorry for the delay. The JSON sent for a field that would be a radio button would be like this:
{
                  "name":"",
                  "data":{},
                  "top":53,
                  "left":387,
                  "width":20,
                  "height":20,
                  "page":0,
                  "type":"INPUT",
                  "value":"X",
                  "subtype":"RADIO",
                  "validation":{"enum":["mygroup"]}
}
In the "value", you'd include "X" for it to be selected null/None for it to be empty. To make a group of radio buttons work in a group, you'd just add the "validation" as shown to give the radio button membership into a particular group. Hope this helps. Let me know if you have questions.

Hello! Looks like you're enjoying the discussion, but haven't signed up for an account.

When you create an account, we remember exactly what you've read, so you always come right back where you left off