Copy link to clipboard
Copied
Hi everybody!
I have the following problem and I hope that someone can help me.
I have a three radio-button choice on my PDF-form (R1; R2; R3) and the third one should visible or hide back an drop-down list.
So the code I made is making my drop-down visible, but when I´m choosing R1 or R2 after my R3 choice its not making my drop-down invisible again.
Can anyone see my mistake and help me?
Thank you in advance and sorry for my bad English
if (event.target.value != "Off") {
// box is checked
this.getField("List").display = display.visible ;
} else {
// box is unchecked
this.getField("List").display = display.hidden ;
}
OK, then create a (hidden) text field with the following custom calculation script:
this.getField("List").display = (this.getField("L3").valueAsString=="Oil+") ? display.visible : display.hidden;
Copy link to clipboard
Copied
Where did you place the code? I would not use the MouseUp event of the
radio-buttons for this, but a custom calculation script of a (hidden) text
field, instead.
On 17 September 2018 at 13:37, gizzyk26506996 <forums_noreply@adobe.com>
Copy link to clipboard
Copied
It is placed in Action - MouseUp event as you said. So how would you do it then? I don't really get your idea.
Copy link to clipboard
Copied
Are the radio-buttons all a part of the same group? If so, what is the group name, and what is the choice value of the third one (the one that you want to use for showing/hiding the other fields)?
Copy link to clipboard
Copied
Yes the radio-buttons are all part of the same group. The group name is L3. But I don't know what you mean exactly by choice value?
Copy link to clipboard
Copied
The value under Properties - Options - Radio Button Choice.
On 17 September 2018 at 16:02, gizzyk26506996 <forums_noreply@adobe.com>
Copy link to clipboard
Copied
Allright, this is "Oil+"
Copy link to clipboard
Copied
OK, then create a (hidden) text field with the following custom calculation script:
this.getField("List").display = (this.getField("L3").valueAsString=="Oil+") ? display.visible : display.hidden;
Copy link to clipboard
Copied
It works perfectly! Thank you so so so much! 🙂