Copy link to clipboard
Copied
Hi,
My question is in two parts. I need to show the field ''eligible_Reguliere'' only if the value of the field ''Total'' is equal or bigger than 45. I tried to run scripts on the field ''eligible_Reguliere''. It doesn't work. I tried putting it in the main Javascript of the document. Doesn't work. My script is:
var totalField = this.getField("Total");
var eligibleField = this.getField("eligible_Reguliere");
if (totalField.value >= 45) { eligibleField.display = display.visible; }
else { eligibleField.display = display.hidden; }
My second part is that I have the field ''eligible_Rapide'' that must show if the box named ''10+'' is checked. How can I do it?
Every research I do bring me back to this page: Définition des conditions d’affichage et de masquage des champs de formulaires (adobe.com)
But I NEVER those options in Acrobat. Help please!
Copy link to clipboard
Copied
For first question, use this script in "Total" field under 'Validate' tab:
var eligibleField = this.getField("eligible_Reguliere");
eligibleField.display = (Number(event.value) >= 45) ? 0:1;
For second question, use this script in ''eligible_Rapide'' field under 'Calculate' tab as 'Custom calculation script':
var box = this.getField("10+").valueAsString;
event.target.display = box === "Off" ? 1:0;
Copy link to clipboard
Copied
For first question, use this script in "Total" field under 'Validate' tab:
var eligibleField = this.getField("eligible_Reguliere");
eligibleField.display = (Number(event.value) >= 45) ? 0:1;
For second question, use this script in ''eligible_Rapide'' field under 'Calculate' tab as 'Custom calculation script':
var box = this.getField("10+").valueAsString;
event.target.display = box === "Off" ? 1:0;
Copy link to clipboard
Copied
Awesome, thanks! It almost 100% works
I still have an issue here because My total value is calculated with the sum of values ''DVL 838'' ''DVL 839'' ''DVL 840'' Diplome 1e cycle'' ''Diplome 2e cycle'' ''Year 1 Waterloo'' ''Year 2 Waterloo'' ''value_Formation 1'' ''value_Formation 2'' ''value_Formation 3'' ''value_Congres 1'' ''value_Congres 2'' and ''value_Congres 3'' so I can't put a personnalised script here and do my sum
Copy link to clipboard
Copied
For 'Total' field use it under 'Validate' tab not 'Calculate'.
Copy link to clipboard
Copied
Hello,
I'm currently working on the fillable form in Adobe Acrobat Sign and I need your assistance on this. What conditions should I need to use to the following?
I have four text fields that are shown by default, and then Text Field 3 and Text Field 4 should be hidden when any value is entered in Text Field 1 or Text Field 2 (vice versa). Thank you.
Copy link to clipboard
Copied
As custom calculation script of any text field, use this:
var t1 = this.getField("Text Field 1");
var t2 = this.getField("Text Field 2");
var t3 = this.getField("Text Field 3");
var t4 = this.getField("Text Field 4");
t1.display = (t3.value!=""||t4.value!="") ? display.hidden : display.visible;
t2.display = (t3.value!=""||t4.value!="") ? display.hidden : display.visible;
t3.display = (t1.value!=""||t2.value!="") ? display.hidden : display.visible;
t4.display = (t1.value!=""||t2.value!="") ? display.hidden : display.visible;
Copy link to clipboard
Copied
Thank you, Nesa.
Where I can put those calculation script? Sorry I'm newbie here in Adobe Acrobat Sign.
Copy link to clipboard
Copied
Use Acrobat to add script, or you can ask on Adobe Sign forum.
Find more inspiration, events, and resources on the new Adobe Community
Explore Now