Expand my Community achievements bar.

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
Former Community Member

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
Former Community Member

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);

The following has evaluated to null or missing: ==> liqladmin("SELECT id, value FROM metrics WHERE id = 'net_accepted_solutions' and user.id = '${acceptedAnswer.author.id}'").data.items [in template "analytics-container" at line 83, column 41] ---- Tip: It's the step after the last dot that caused this error, not those before it. ---- Tip: If the failing expression is known to be legally refer to something that's sometimes null or missing, either specify a default value like myOptionalVar!myDefault, or use <#if myOptionalVar??>when-present<#else>when-missing. (These only cover the last step of the expression; to cover the whole expression, use parenthesis: (myOptionalVar.foo)!myDefault, (myOptionalVar.foo)?? ---- ---- FTL stack trace ("~" means nesting-related): - Failed at: #assign answerAuthorNetSolutions = li... [in template "analytics-container" at line 83, column 5] ----