Link in Zwischenablage kopieren
Kopiert
I’ve created a form and below is a snag-it of part of the form in question.
The drop-down “Expenditure Type:” has an option “Other” as one of the selections. When “Other” is selected the following appears:
Underneath the second row I have labels. I’m wondering if there is a way to hide/show the “Acct Code” and “Expenditure Type” (squared in red) when
Hide "Acct Code" and Expenditure Type" when the option "Other" is not selected
Show "Acct Code" and Expenditure Type" when the option "Other" is selected
Thank you for your assistance in advance.
Link in Zwischenablage kopieren
Kopiert
As the custom calculation script of the drop-down enter this code:
if (event.value=="Other") {
this.getField("Acct Code").display = display.visible;
this.getField("Expenditure Type").display = display.visible;
} else {
this.getField("Acct Code").display = display.hidden;
this.getField("Expenditure Type").display = display.hidden;
}
Link in Zwischenablage kopieren
Kopiert
As the custom calculation script of the drop-down enter this code:
if (event.value=="Other") {
this.getField("Acct Code").display = display.visible;
this.getField("Expenditure Type").display = display.visible;
} else {
this.getField("Acct Code").display = display.hidden;
this.getField("Expenditure Type").display = display.hidden;
}
Link in Zwischenablage kopieren
Kopiert
I’ve tried the coding provided in the correct location and it does not seem to be working. The “Acct Code” and “Expenditure Type” are “Add Text” boxes created in Edit PDF Tool, and not a "Text Field" created in Prepare Form Tool. I apologize if I confused the terms.
Please let me know if there is a way to show/hide these fields, if not, is there another solution?
Thanks again for your assistance.
Link in Zwischenablage kopieren
Kopiert
You should use text fields for this.
Link in Zwischenablage kopieren
Kopiert
Great suggestion. I used text fields and got it to work - partially.
How do I auto-populate the text fields with the labels needed "Acct Code" and "Expenditure Type"?
Link in Zwischenablage kopieren
Kopiert
You can enter those values as their default values.
Link in Zwischenablage kopieren
Kopiert
Blushing..........I should have known that
Thank you so much.
Weitere Inspirationen, Events und Ressourcen finden Sie in der neuen Adobe Community
Jetzt ansehen