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

How to allow deselecting "multiple" radio buttons via a function

Avatar

Avatar
Validate 10
Level 3
SI_MSD7
Level 3

Likes

17 likes

Total Posts

220 posts

Correct Reply

10 solutions
Top badges earned
Validate 10
Validate 1
Boost 5
Boost 3
Boost 10
View profile

Avatar
Validate 10
Level 3
SI_MSD7
Level 3

Likes

17 likes

Total Posts

220 posts

Correct Reply

10 solutions
Top badges earned
Validate 10
Validate 1
Boost 5
Boost 3
Boost 10
View profile
SI_MSD7
Level 3

19-03-2021

I've used the following script on individual radio buttons to allow users to deselect an active group; however, I currently have a form with over 100 existing radio buttons that do not have the script added. Rather than manually add the script to each radio button individually, I was wondering if there's a way to create function of sorts that will allow global treatment.

 

Script used on single radio button via click event

// If Shift button is held while clicking radio button, clear selection

if (xfa.event.shift){

this.rawValue = "";

}

 

I presume the function would need to cycle through all objects throughout the form and those with the className as "exclGroup"  (i.e. radio button) would be impacted by the script thus allowing deselection.

 

Any help is much appreciated!

deselect radio button radio buttons

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Springboard
MVP
Magus069
MVP

Likes

143 likes

Total Posts

1,077 posts

Correct Reply

155 solutions
Top badges earned
Springboard
Validate 1
Ignite 3
Ignite 1
Establish
View profile

Avatar
Springboard
MVP
Magus069
MVP

Likes

143 likes

Total Posts

1,077 posts

Correct Reply

155 solutions
Top badges earned
Springboard
Validate 1
Ignite 3
Ignite 1
Establish
View profile
Magus069
MVP

19-03-2021

Hi there,

 

I've made a function back in the days that technically cycles through all the form to reset only wanted fields only by adding "Exception" names.

If you're able to view the code and manipulate you'll be able to do exactly what you want to do.

Feel free to ask any question if needed.

 

https://experienceleaguecommunities.adobe.com/t5/adobe-livecycle-discussions/validation-reset-functi...

 

Hope this will help.

Answers (0)