Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn More

View all

Sign in to view all badges

Resting Radio Buttons when Radio Button Field is hidden

Avatar

Avatar
Level 1
linseys32573127
Level 1

Likes

0 likes

Total Posts

3 posts

Correct Reply

0 solutions
View profile

Avatar
Level 1
linseys32573127
Level 1

Likes

0 likes

Total Posts

3 posts

Correct Reply

0 solutions
View profile
linseys32573127
Level 1

24-10-2019

Hi,

I have a subform with 4 radio button options that's hidden. Based on answers earlier in the form, only certain radio buttons will appear. How do I reset the radio buttons when they're hidden without creating a "Reset" button?

For instance in question 1  if they check "yes" radio buttons A B C will show. IF they click radio button A then a specific set of questions will appear. But if they uncheck yes in question 1 - then the A B C radio buttons will disappear, but the special subforms for A are still visible. Is there a way when the radio buttons are hidden that they are basically rest - which would rest the rest my form?

I have the radio buttons set up so when A is NOT selected the subforms for that option are hidden. However, when the field with the radio buttons are hidden, A is still selected, just not visible.

Hopefully this is as clear as mud.

Accepted Solutions (0)

Answers (1)

Answers (1)

Avatar

Avatar
Boost 50
MVP
_Bruce_Robertson
MVP

Likes

270 likes

Total Posts

1,782 posts

Correct Reply

372 solutions
Top badges earned
Boost 50
Boost 5
Boost 3
Boost 250
Boost 25
View profile

Avatar
Boost 50
MVP
_Bruce_Robertson
MVP

Likes

270 likes

Total Posts

1,782 posts

Correct Reply

372 solutions
Top badges earned
Boost 50
Boost 5
Boost 3
Boost 250
Boost 25
View profile
_Bruce_Robertson
MVP

25-10-2019

Hi,

This depends on how you have done your show/hide code.  If you were to have a subform that contained a radio button list called YesNo, one called ABC and a subform call aContent, then in the subform calculate event you could have code like;

if (YesNo.rawValue == 1) {

  ABC.presence = "visible";

} else {

  ABC.presence = "hidden";

  xfa.host.resetData(ABC.somExpression);

}

if (ABC.rawValue == 1) {

  aContent.presence = "visible";

} else {

  aContent.presence = "hidden";

}

The thing to note here is that when the ABC radio button list is hidden the value is also reset with the call to xfa.host.resetData()

Bruce