Skip to main content
Known Participant
September 5, 2020
Answered

Two problems

  • September 5, 2020
  • 1 reply
  • 972 views

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.

 

This topic has been closed for replies.
Correct answer try67

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.

1 reply

try67
Community Expert
Community Expert
September 5, 2020

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?

MarietaaAuthor
Known Participant
September 5, 2020

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.

try67
Community Expert
try67Community ExpertCorrect answer
Community Expert
September 5, 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.