Reputation: 1131
I am trying to create and send a template using anchor tags using docusign in Ruby on Rails. When I view the template in sender view it shows the data being replaced.
When I send the template to a receiver and the document is reviewed the document doesn't show the anchor tag text.
This is the code I am using.
[ {'name' => 'Name1', 'value' => 'name_1'},
{'name' => 'Name2', 'value' => 'name_2'},
{'name' => 'Name3', 'value' => 'name_3'}].each { |item|
name = DocuSign_eSign::Text.new(
{
'anchorString': "[#{item['name']} Name]",
'nchorXOffset': '0',
'anchorYOffset': '0',
'anchorIgnoreIfNotPresent': 'true',
'editable': 'false',
'value': args["#{item['value']}_name".to_sym] || "",
'fontSize': 'Size12',
'font': 'Arial',
'bold': 'true'
}
)
text_tabs << name
address = DocuSign_eSign::Text.new(
{
'anchorString': "[#{item['name']} Address]",
'anchorXOffset': '0',
'anchorYOffset': '0',
'anchorIgnoreIfNotPresent': 'true',
'editable': 'false',
'value': args["#{item['value']}_address".to_sym] || "",
'width': '140',
'height': '60',
'fontSize': 'Size12',
'font': 'Arial',
'bold': 'true'
}
)
text_tabs << address
}
template_role = DocuSign_eSign::TemplateRole.new(
email: args[:recipient_email],
name: args[:recipient_name],
roleName: entity_type,
routingOrder: '1',
tabs: {
signHereTabs: [sign_here],
textTabs: text_tabs
}
)
Can anyone suggest why this is happening. I am working in sandbox environment.
Upvotes: 0
Views: 126
Reputation: 14005
So, it could be a number of things, but the most common culprit has to do with the template role.
Note this line:
roleName: entity_type
This roleName must match what's in your template for the given "receiver" (the correct term is recipient or signer).
Please check what value you're passing in this line and make sure it matches the values set for placeholder recipients (or roles) in the template you are using.
Upvotes: 1