Skip to main content
Participating Frequently
September 15, 2023
Answered

Select Radio button

  • September 15, 2023
  • 1 reply
  • 787 views

Good morning,

I'm having a problem selecting a radio button in javascript.
I have a radio group that has the name "groupRadio" and the name of each button is radio1, radio2, radio3.
What code should I do to select the radio2 button?
I tried 

 

this.getField("groupRadio") = "radio2"

 


But it doesn't work!

Thanks for your help.

 
This topic has been closed for replies.
Correct answer Nesa Nurani

Use this:

this.getField("groupRadio").value = "radio2";

1 reply

Nesa Nurani
Community Expert
Nesa NuraniCommunity ExpertCorrect answer
Community Expert
September 16, 2023

Use this:

this.getField("groupRadio").value = "radio2";
Participating Frequently
September 16, 2023

Good morning,
Thank you, it works correctly.
Sincerely