Skip to main content
Known Participant
June 5, 2016
Answered

How do you Return string as multi line text?

  • June 5, 2016
  • 3 replies
  • 6572 views

I am trying to display a returned string as a multi liner instead of single liner to be displayed on a page in Adobe Acrobat. Var str = "" returns one line obviously. please advise.

This topic has been closed for replies.
Correct answer George_Johnson

Tried:

{

                                                            type: "edit_text",

                                                            item_id: "LPfx",

                                                            variable_Name: "strLabelPrefix",

                                                            width: 129,

                                                            height: 43                                                                                                                                                                                                     char_width: 8,

                                                            multiline: "true",

                                                        },

but it only returns 2 lines instead of 3 and there is an unwanted return between line 1 and line 2.  Any advise?


This line:

                          multiline: "true",

Should be changed to this:

                          multiline: true,

3 replies

Inspiring
June 8, 2016

See Concatenate Fields for a working example for combining a number of fields into on line and multiple line fields.

Inspiring
June 5, 2016

One has to use the custom JavaScript calculation option.

Since you use the term "return" are you using a defined function to create the string?

One only needs to concatenate the line feed or carriage return to the string at the place where one wants the line break to appear.

JavaScript Control Characters in MDN JavaScript Reference.

We mostly use "\r" for carriage return and "\n" for a new line. These are non-printable control codes. There is additional codes for horizontal tab

Legend
June 5, 2016

You add "\r" for linebreaks.

(if that does not lead to the desired result, use "\n" instead).

Hope this can help.

suemo22Author
Known Participant
June 6, 2016

Hi,

Thank you for your response.  I am trying to execute this but the changes are not saved for some reason.  I may have to post on this forum regarding this problem.  I will keep trying and let you know if it works.

S

suemo22Author
Known Participant
June 6, 2016

Hi,

I have a form where a user is entering information in a box.  I want whatever the user is entering to then be outputted on the pdf page in multiple lines instead of one line. after they hit ok.  Thx for your help.

S