If I select any radio button then automatically single line text gwl_ or ll_ canlife _ should popula

Mahesho11
Tera Contributor

If I select any radio button then automatically single line text gwl_ or ll_ canlife _ should populate.

 

Mahesho11_0-1706947982181.png

example

 if gwl is selected then domain name is refelected gwl_

if ll is selected then domain name is refelected ll_

if canlife is selected then domain name is refelected canlife_

 

 

1 ACCEPTED SOLUTION

Siddhesh Gawade
Mega Sage
Mega Sage

Hello @Mahesho11 ,

 

Create on onChange client script on select domain variable.

SiddheshGawade_0-1706969801933.png

 

function onChange(control, oldValue, newValue, isLoading) {
   if (isLoading || newValue == '') {
g_form.setValue('domain_name','gwl_');  // Use this for setting the value when form is loading, choose the value for your default radio choice for me it is gwl.
      return;
   }
   
switch(g_form.getValue('select_domain')) {       
case 'gwl': 
g_form.setValue('domain_name','gwl_');
break;
case 'ii': 
g_form.setValue('domain_name','ll_');
break;
case 'canlife': 
g_form.setValue('domain_name','canlife_');
break;
   } 
}

 

Kindly mark the answer ✔️Correct or Helpful ✔️If it addresses your concern.


Regards,

Siddhesh

View solution in original post

1 REPLY 1

Siddhesh Gawade
Mega Sage
Mega Sage

Hello @Mahesho11 ,

 

Create on onChange client script on select domain variable.

SiddheshGawade_0-1706969801933.png

 

function onChange(control, oldValue, newValue, isLoading) {
   if (isLoading || newValue == '') {
g_form.setValue('domain_name','gwl_');  // Use this for setting the value when form is loading, choose the value for your default radio choice for me it is gwl.
      return;
   }
   
switch(g_form.getValue('select_domain')) {       
case 'gwl': 
g_form.setValue('domain_name','gwl_');
break;
case 'ii': 
g_form.setValue('domain_name','ll_');
break;
case 'canlife': 
g_form.setValue('domain_name','canlife_');
break;
   } 
}

 

Kindly mark the answer ✔️Correct or Helpful ✔️If it addresses your concern.


Regards,

Siddhesh