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
Bedrock Mission!

Learn more

View all

Sign in to view all badges

SOLVED

Mandatory Radio Boxes

mmgiath
Level 7
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
Niall_O_Donovan
Correct answer by
Level 10
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
Niall_O_Donovan
Level 10
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

mmgiath
Level 7
Level 7

Hi Niall,

works perfect!

One more question:

How I can deselect radio button?

Thnaks

Niall_O_Donovan
Correct answer by
Level 10
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