Copy link to clipboard
Copied
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:
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!
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
Copy link to clipboard
Copied
Is this a Adobe Sign Form?
Copy link to clipboard
Copied
No - should I convert it to an Adobe Sign Form?
Copy link to clipboard
Copied
What does you mean with "Signature Blocks"? This exists only in Adobe Sign forms.
Copy link to clipboard
Copied
I was still able to add a digital signature to an Acrobat Form, though I'm not familiar with the differences.
Once converted to an Adobe Sign Form, how can I go about this issue?
Copy link to clipboard
Copied
For Adobe Sign forms use the forum for Adobe Sign.
Copy link to clipboard
Copied
Well I would still like it to be a digital signature, and that does not seem to be what I am looking for.
In an adobe acrobat form, how would I do this making reference to the above field names?
Copy link to clipboard
Copied
Any help would be greatly appreciated if the form were to stay in Acrobat Form (as opposed to a sign form)!
Copy link to clipboard
Copied
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;
Copy link to clipboard
Copied
Thanks for the help, Try67. That still doesn't seem to be effective....
Also, Why does Number not have quotations on the first line?
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
The debugger says that Number is not defined. Any thoughts here?
Copy link to clipboard
Copied
Did you change anything in the code?
Copy link to clipboard
Copied
No but I do have a checkbox that show/hide the Number field (along with others). It now seems to break at the number field.
Debugger says it is null.
Copy link to clipboard
Copied
There's no reference in the code to a field called "Number". If you didn't change anything and the field names are correct then it should work. I'll need to see the actual file to help you further.
Copy link to clipboard
Copied
Thanks Try67! I got it to work! One last item - if the value of Number is null, I want nothing to show - how would I add that in?
Copy link to clipboard
Copied
That's a bit trickier... Change the code to this:
if (event.value=="") {
this.getField("Field 1").display = display.hidden;
this.getField("Field 2").display = display.hidden;
// etc.
} else {
// put the original code here
}
Copy link to clipboard
Copied
Great, thanks for all the help!