I have a text tab assigned to a recipient and I’m prefilling its content when creating the envelope via Docusign API. I need to break the line using \n, but when I add this character in my text, the text tab shows it instead of breaking the line. I also tried \\n, but had no success.
How can I accomplish this?
Best answer by Drew.Martin
“\n” is the proper character for a linebreak, but it may be that whatever system you’re using is adding unwanted escape characters. One way to check for this is to:
Send a test API call with the desired text in the text tab
Download the resulting zip file, check for the CreateEnvelope call (or AddEnvelopeTags if you’re doing it piecemeal) and find the text tab in question - the “value” param will show what exactly is being sent over to Docusign. If it’s not exactly \n then that will give you something to investigate.
example text tab with linebreaks
Also, you might check to make sure your tab has a “height” value that’s more than one line tall.
“\n” is the proper character for a linebreak, but it may be that whatever system you’re using is adding unwanted escape characters. One way to check for this is to:
Send a test API call with the desired text in the text tab
Download the resulting zip file, check for the CreateEnvelope call (or AddEnvelopeTags if you’re doing it piecemeal) and find the text tab in question - the “value” param will show what exactly is being sent over to Docusign. If it’s not exactly \n then that will give you something to investigate.
example text tab with linebreaks
Also, you might check to make sure your tab has a “height” value that’s more than one line tall.
@Drew.Martin thanks for the input! After some investigation, I found that my application was adding an additional backslash, which caused Docusign to display ‘\n’ in the my text and not break the line as I expected. After fixing this issue, I was able to add linebreakers!
You can login or register as either a Docusign customer or developer. If you don’t already have a Docusign customer or developer account, you can create one for free when registering.
You can login or register as either a Docusign customer or developer. If you don’t already have a Docusign customer or developer account, you can create one for free when registering.