ThAccording radio button selection set value to next field

vikasgc1999
Tera Expert

There is a field called Domain that consists of 4 radio buttons. if we select Any one domain there is another field called security group name if we select domain any one the value of domain is need to set security group name.

 

1 REPLY 1

Sid_Takali
Kilo Patron
Kilo Patron

Hi @vikasgc1999 try below code

function onSubmit() {
    //Type appropriate comment here, and begin script below
    var option = g_form.getValue('radio button name');
  
    if (option == 'RadioButtonChoice 1') {
        g_form.setValue(SecurityGroupNameField, 'choice 1 ');
   } else if (option == 'RadioButtonChoice 2') {
        g_form.setValue(SecurityGroupNameField, 'choice 2 ');
   } else if (option == 'RadioButtonChoice  3') {
        g_form.setValue(SecurityGroupNameField, 'choice 3 ');
   } else if (option == 'RadioButtonChoice  ') {
        g_form.setValue(SecurityGroupNameField, 'choice 4 ');
   }
}

 

Please mark my answer Correct/Helpful,

Regards,

Siddharam