Need to hide choice list on the field which is under section

harinya
Tera Contributor

function onload(){

var value=g_form.getValue('connect');

if(value=='6')//6 is the backend value of my connect choice

{

g_form.removeOption('result', '4');

}

else{

g_form.addOption('result', '4', 'confirmed');

}
but this code is not working can some one help on this , 
result filed is in form section as like below image

harinya_0-1742399188559.png

 


Thanks in advance

10 REPLIES 10

GopikaP
Mega Sage

Hi @harinya , what is the type of the variable 'result'? It doesn't matter if the field is under a section.

harinya
Tera Contributor

Thanks for Response
That is a String field

 

In the dictionary of that field, under section - 'Choice List Specification', Choose- 'Dropdown with None and try SC1.png

harinya
Tera Contributor

i can able to see the alert messages