Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Line Break

Enthusiast ,
Jul 14, 2020 Jul 14, 2020

Someone help pls, how to get second calculation in new line

event.value = Number(this.getField("field").valueAsString)*5 + "\n" *5;

 

TOPICS
Acrobat SDK and JavaScript
711
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Participant , Jul 14, 2020 Jul 14, 2020

 

var r = Number(this.getField("field").valueAsString);
event.value = r*5+"\n"+r*5;

 

Translate
Community Expert ,
Jul 14, 2020 Jul 14, 2020

You need to better explain what you're trying to achieve, because your code doesn't make much sense...

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Jul 14, 2020 Jul 14, 2020

Need to make line break to show same result of calculation (*5) in both rows.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jul 14, 2020 Jul 14, 2020

So you want to show the same value twice, each one in a separate line?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Jul 14, 2020 Jul 14, 2020

 

var r = Number(this.getField("field").valueAsString);
event.value = r*5+"\n"+r*5;

 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Jul 14, 2020 Jul 14, 2020
LATEST

Thanks, that worked. 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines