Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.
SOLVED

how could I add a message that appear when you open the form

Avatar

Level 3

how could I add a message that appear only when you open the Form 1st time

and this message contain text with multi lines

exactly like this :

befor you begain.jpg

I need the  whole the code  , and where could I put it   please

I mad this photo on photoshop

Adobe Experience Manager Forms

1 Accepted Solution

Avatar

Correct answer by
Employee Advisor

to call a script on form initialize place the script on the docReady event:

1655498_pastedImage_0.png

Once you create the script you can edit in the script editor:

1655499_pastedImage_1.png

View solution in original post

8 Replies

Avatar

Employee Advisor

You can put the message on form initialise of guideroot container.

Avatar

Level 3

this code give the message

===========

xfa.host.messageBox("   السلام عليكم ورحمة الله وبركاته ... يعطيك قالب التقارير تعليمات مباشرة عن مكوناته وكيفية التعامل مع حقوله    كل ما عليك فعله هو وضع زر الماوس على الحقل لتعرف المطلوب ", "Alert", 3);

but I need the message apear on there lines :

first line :

السلام عليكم ورحمة الله وبركاته

2nd line :

يعطيك قالب التقارير تعليمات مباشرة عن مكوناته وكيفية التعامل مع حقوله

3rd line :

يعطيك قالب التقارير تعليمات مباشرة عن مكوناته وكيفية التعامل مع حقوله    كل ما عليك فعله هو وضع زر الماوس

==how can write the code to make the message on 3 lines ?

Avatar

Level 7

Have you tried inserting \n

It may insert a new line character.

E.g.

"Abc def"

"Abc\n def"

Avatar

Community Advisor

In html string you can try adding <br> for new line

"This text contains<br>a line break."

Avatar

Employee Advisor

Use this

xfa.host.messageBox("السلام عليكم ورحمة الله وبركاته\u000a يعطيك قالب التقارير تعليمات مباشرة عن مكوناته وكيفية التعامل مع حقوله \u000a يعطيك قالب التقارير تعليمات مباشرة عن مكوناته وكيفية التعامل مع حقوله    كل ما عليك فعله هو وضع زر الماوس ");

Thanks,

Mayank

Avatar

Correct answer by
Employee Advisor

to call a script on form initialize place the script on the docReady event:

1655498_pastedImage_0.png

Once you create the script you can edit in the script editor:

1655499_pastedImage_1.png

Avatar

Level 3

thanks Mayank .. thank you so much

I have have one more Q  .. hope you can help me

https://forums.adobe.com/message/10836233#10836233

Avatar

Employee Advisor

Great that the solution worked for you!

I will check and let you know about the other question also.

Thanks,

Mayank Gandhi