How to line break in a textbox | Community
Skip to main content
Nov 6, 2013 7:53 PM UTC
Question

How to line break in a textbox

Hello guys(and girls),

     Does anybody know a way to line break within a textbox? I am dynamicaly filling a textbox using a string and i was wondering if there is any "code" or <tag> i could put into my string to tell the texbox to line break?

     Textbox is set to allow multiple lines and field format is Rich text.

Thanks alot!
Max

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

17 replies

dylans17538794
New Participant
Oct 3, 2020 3:11 AM UTC

Try using this tool for all of your line break needs!

https://apps4lifehost.com/Instagram/CaptionMaker.html

Hope this helps 

Translate
blahbap
New Participant
Sep 11, 2014 7:15 AM UTC

What we're talking about here is not formatting the string in Javascript, but formatting a string that is passed into the form via a data connection. The value of the text field in the form is bound to the string in the data view. 

Translate
radzmar
Level 10
Sep 10, 2014 4:00 PM UTC

Hi,

to add a new line into a text field use \n within the string.


textField1.rawValue = "This\ntext\ncontains\nlinebreaks.";


Translate
blahbap
New Participant
Sep 10, 2014 12:06 PM UTC

Hi MTremblay-Savard,

I am trying to achieve the same as you without success - could you show be exactly what your string looks like?

thanks!

Frank

Translate
Nov 7, 2013 8:37 PM UTC

I found the solution!

I've put the ascii code for "new line" into my string where i wanted it to line break and i've pushed my string into the textbox using the data binding and it worked like a charm.

Thanks for all your help Justin!

Max

Translate
Nov 7, 2013 4:27 PM UTC

XML Schema

In which event should i put your code?

Translate
Level 2
Nov 7, 2013 4:21 PM UTC

In Designer, go to the Data View tab.  You should see a data connection.  Right-click on the data connection and select "Connection Properties".  The "Data Description Type" will tell you the type of data connection.

Translate
Nov 7, 2013 4:16 PM UTC

Do you know how i can know which type of data connection i have defined?

Translate
Level 2
Nov 7, 2013 4:09 PM UTC

I'm not familiar with the SAP integration, but I'm pretty sure it's using the LiveCycle Forms module to render the form.

What type of data connection do you have defined in Designer?  It has to be one of the following:

  1. XML Schema
  2. Sample XML Data
  3. Data Model
  4. WSDL File
  5. OLEDB Database

I'm guessing it is 1 or 2, in which case the instructions I gave you above for exporting the XML data would still apply.  You just need to make sure the data in SAP looks like whatever is in the exported XML file.

Translate
Nov 7, 2013 3:58 PM UTC

I am filling the context of the form using adobe livecycle designer integrated to SAP.

Translate