Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

SOLVED

How to insert a carriage return chr(13) to a message box

Avatar

Level 3

On my form I have a button, called "Instruction".

When the user clicks on it, I present him with a message box expalining key points about the form and the fields.

Here a dummy example:

xfa.host.messageBox("Hello Everyone! The form contains 5 required field identied by Red border. Make sure you fill them before submitting the form. To calculate the winner percentage you Must fill in the number of tables first."

, "INSTRUCTION", 3);

There must be a way to insert a line in a message box, such as chr(13).

What's the syntax?

1 Accepted Solution

Avatar

Correct answer by
Level 10

To enter a CR in a string for javascript use a \n in the text of your string.

paul

View solution in original post

4 Replies

Avatar

Correct answer by
Level 10

To enter a CR in a string for javascript use a \n in the text of your string.

paul

Avatar

Level 10

Here's an example:

xfa.host.messageBox("Hello\n\nthis is\na message with\nline breaks!", "Message", 0, 0);