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

Line Break

Enthusiast ,
Jul 14, 2020 Jul 14, 2020

Copy link to clipboard

Copied

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

Views

395

Translate

Translate

Report

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;

 

Votes

Translate

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

Copy link to clipboard

Copied

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

Votes

Translate

Translate

Report

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

Copy link to clipboard

Copied

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

Votes

Translate

Translate

Report

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

Copy link to clipboard

Copied

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

Votes

Translate

Translate

Report

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

Copy link to clipboard

Copied

 

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

 

Votes

Translate

Translate

Report

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

Copy link to clipboard

Copied

LATEST

Thanks, that worked. 

Votes

Translate

Translate

Report

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