Skip to main content
jonathanm75257324
Known Participant
May 14, 2019
Answered

Showing/Hiding Signatures Based on Ranges

  • May 14, 2019
  • 3 replies
  • 1464 views

Hi - I'm struggling a bit with a simple field validation issue. Based off of one field (called "NUMBER") I would like the following to appear (and the rest to disappear if not applicable) within the following ranges:

  • 0-499,999 would trigger "Field 1"
  • 500,000-2,499,999 would trigger "Signature Block A"
  • 2,500,000-5,000,000 would trigger "Signature Block B"
  • 5,000,001+ would trigger "Field 2"

I can also post the custom Java script if that helps but I have no luck with this custom code as of yet.  Any help would be greatly appreciated. Thanks!

This topic has been closed for replies.
Correct answer try67

Yes, I don't think you need to use Adobe Sign to do it. It's perfectly feasible in a normal Acrobat form, and probably easier.

You can use this code to achieve it, as the custom validation script of the NUMBER field:

var v = Number(event.value);

this.getField("Field 1").display = (v>=0 && v<=499999) ? display.visible : display.hidden;

this.getField("Signature Block A").display = (v>=500000 && v<=2499999) ? display.visible : display.hidden;

this.getField("Signature Block B").display = (v>=2500000 && v<=5000000) ? display.visible : display.hidden;

this.getField("Field 2").display = (v>5000000) ? display.visible : display.hidden;

3 replies

try67
try67Correct answer
Community Expert
May 14, 2019

Yes, I don't think you need to use Adobe Sign to do it. It's perfectly feasible in a normal Acrobat form, and probably easier.

You can use this code to achieve it, as the custom validation script of the NUMBER field:

var v = Number(event.value);

this.getField("Field 1").display = (v>=0 && v<=499999) ? display.visible : display.hidden;

this.getField("Signature Block A").display = (v>=500000 && v<=2499999) ? display.visible : display.hidden;

this.getField("Signature Block B").display = (v>=2500000 && v<=5000000) ? display.visible : display.hidden;

this.getField("Field 2").display = (v>5000000) ? display.visible : display.hidden;

jonathanm75257324
Known Participant
May 14, 2019

Thanks for the help, Try67. That still doesn't seem to be effective....

Also, Why does Number not have quotations on the first line?

try67
Community Expert
May 14, 2019

Check the JS Console for errors, then.

It doesn't have quotes because it's not a reference to the field, but a call to the constructor method of the Number object in JavaScript, which is basically converting the string value to a number value.

jonathanm75257324
Known Participant
May 14, 2019

Any help would be greatly appreciated if the form were to stay in Acrobat Form (as opposed to a sign form)!

Bernd Alheit
Community Expert
May 14, 2019

Is this a Adobe Sign Form?

jonathanm75257324
Known Participant
May 14, 2019

No - should I convert it to an Adobe Sign Form?

Bernd Alheit
Community Expert
May 14, 2019

What does you mean with "Signature Blocks"? This exists only in Adobe Sign forms.