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

Two problems

Explorer ,
Sep 05, 2020 Sep 05, 2020

Copy link to clipboard

Copied

Hi, I have two problems.

1. How to stop value from increase? if value reach 8 I want to stop it there from increase further.

2. In my text fields font size is set to auto but it doesn't work.

As usual thanks in advance for helping.

 

TOPICS
Acrobat SDK and JavaScript

Views

430

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

Community Expert , Sep 05, 2020 Sep 05, 2020

1. Change it to:

if (Number(this.getField("Text12").value)<8)

this.getField("Text12").value += 1;

2. After changing the font size you have to also change the text for it to update.

Votes

Translate

Translate
Community Expert ,
Sep 05, 2020 Sep 05, 2020

Copy link to clipboard

Copied

1. You need to be a bit more specific than that... Are you talking about a form field? If so, how is it increasing, exactly? Are you using a script to do it directly, or is it a calculation? How is it set up, etc.?

2. What does that mean, exactly? Does the font size not change as you enter more text in to it? If not, then what happens?

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
Explorer ,
Sep 05, 2020 Sep 05, 2020

Copy link to clipboard

Copied

1. Value is increased from button click, this code is used as button mouseUp:

this.getField("Text12").value += 1;

2. Text doesn't resize to field size.

Izrezak.PNG

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 ,
Sep 05, 2020 Sep 05, 2020

Copy link to clipboard

Copied

1. Change it to:

if (Number(this.getField("Text12").value)<8)

this.getField("Text12").value += 1;

2. After changing the font size you have to also change the text for it to update.

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
Explorer ,
Sep 05, 2020 Sep 05, 2020

Copy link to clipboard

Copied

1. That worked thank you.

2. I turned off Rich text formatting and that helped.

It's not possible to have rich text formatting and auto size?

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 ,
Sep 05, 2020 Sep 05, 2020

Copy link to clipboard

Copied

LATEST

2. Unfortunately, no.

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