Skip to main content
Participant
July 24, 2025
Answered

PDF Scripting

  • July 24, 2025
  • 1 reply
  • 177 views

Hi! Is it possible, depending on the number input, to either add or subtract within this one field box? For clarity, I want to either add a single number or substract a single number. Hope this makes sense. Thanks!

Correct answer creative explorer

 

@lynie13 Short answer yes you can. You can either have either one field, but  you must use a hidden field to store the running total and clear the visible field after each entry. This allows the visible field to act as an input prompt for the next number.

 

Or you can have two-field approach (Input Field + Result/Calculation Field) is generally more straightforward for this kind of functionality in Acrobat. The user enters a value in one field, and the other field automatically updates. You'd simply rely on the user to enter a signed number (e.g., 5 to add 5, -3 to subtract 3).

1 reply

creative explorer
Community Expert
creative explorerCommunity ExpertCorrect answer
Community Expert
July 24, 2025

 

@lynie13 Short answer yes you can. You can either have either one field, but  you must use a hidden field to store the running total and clear the visible field after each entry. This allows the visible field to act as an input prompt for the next number.

 

Or you can have two-field approach (Input Field + Result/Calculation Field) is generally more straightforward for this kind of functionality in Acrobat. The user enters a value in one field, and the other field automatically updates. You'd simply rely on the user to enter a signed number (e.g., 5 to add 5, -3 to subtract 3).

m