Expand my Community achievements bar.

Guidelines for the Responsible Use of Generative AI in the Experience Cloud Community.
SOLVED

Mandatory Radio Boxes

Avatar

Level 7

I have two mandatory radio boxes and this I like to achive it is on Exit

Event the red border to dissapear.

I have try this script below without any luck:

if

(Radio.rawValue != null)

{Radio.mandatory

= "disabled"; }

How I can make this to work?

THANKS

1 Accepted Solution

Avatar

Correct answer by
Level 10

Hi,

This came up recently and there is a sample here: https://acrobat.com/#d=XGJNoujaSvn2X-7eJhi07A

The interesting thing is that the original solution was based on the initValue which worked for versions of Acrobat v8 and below.

However this does not appear to work in Acrobat v9, so hence the second example specifically for Acrobat v9. This is based on a hidden textfield that temporarily holds the initial value of the radio button group.


If your users have Acrobat v9 I would be included to run with the second example, event though it is not as neat. Mainly because it will work for all versions of Acrobat.

Niall

UPDATE: I take it back, the first example does work in Acrobat v9, so that is the one to go for. Sorry!!

View solution in original post

3 Replies

Avatar

Level 10

Hi,

I have updated the sample here: https://acrobat.com/#d=J0KsvCyW0s4qUECdSXMEdQ

Because the user can't deselect a radiobutton groups I would just be inclined to go with a line in the click event:

this.mandatory = "disabled"; 

If you do want to test the radiobutton group value use "" instead of null.

Good luck,

Niall

Avatar

Level 7

Hi Niall,

works perfect!

One more question:

How I can deselect radio button?

Thnaks

Avatar

Correct answer by
Level 10

Hi,

This came up recently and there is a sample here: https://acrobat.com/#d=XGJNoujaSvn2X-7eJhi07A

The interesting thing is that the original solution was based on the initValue which worked for versions of Acrobat v8 and below.

However this does not appear to work in Acrobat v9, so hence the second example specifically for Acrobat v9. This is based on a hidden textfield that temporarily holds the initial value of the radio button group.


If your users have Acrobat v9 I would be included to run with the second example, event though it is not as neat. Mainly because it will work for all versions of Acrobat.

Niall

UPDATE: I take it back, the first example does work in Acrobat v9, so that is the one to go for. Sorry!!