Skip to main content
famruch
Level 2
Oct 16, 2015 2:30 AM UTC
Solved

Visibility Logic

Hi Guys,

I have got a yes/no radio button and a textfield. I want to make the textfield visible/hidden based on whether the user selects yes or no. In the Visibility expression of the textfield, I can enter radiobutton.value == "1" to make it only visible if the user selects the yes option. The problem with this method is that in the initial layout of the form the textfield is hidden and then becomes visible when the user selects yes.

Please does anyone know how I can have the textfield visible to start off with and then when the user selects no, the textfield is hidden?

Thanks very much,

Afam

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
rishim22446870
rishim22446870Accepted solution
Adobe Employee
Oct 16, 2015 2:30 AM UTC

There could be three solutions to your problem:

a) Suggested by mandeep.

b) You can use this visible expression in text field, (radiobutton.value === null ? true : (radibutton.value == "1")) . Assuming you have no default value set.

c) Set a default value for the radio button.

4 replies

famruch
famruchAuthor
Level 2
Oct 16, 2015 2:30 AM UTC

Thanks Rishi,

Tried your solution 1 & 2 and both worked for me.

Much appreciated.

Afam

Translate
famruch
famruchAuthor
Level 2
Oct 16, 2015 2:30 AM UTC

Thanks Mandeep,

Worked for me.

Much Appreciated,

Afam

Translate
Adobe Employee
Oct 16, 2015 2:30 AM UTC

Can you try radiobutton.value != 0 ??  (supposing 0=No )

Translate
rishim22446870
Adobe Employee
rishim22446870Adobe EmployeeAccepted solution
Adobe Employee
Oct 16, 2015 2:30 AM UTC

There could be three solutions to your problem:

a) Suggested by mandeep.

b) You can use this visible expression in text field, (radiobutton.value === null ? true : (radibutton.value == "1")) . Assuming you have no default value set.

c) Set a default value for the radio button.

Translate