Hide/Show radiobutton options on portal catalog UI

AsheeshG
Tera Contributor

Hi ,

I have a requirement where i need to hide the radio button options on catalog item form based on other field value change.

The code which i wrote works on native ui but not on the portal.

below is the code that works on the native 

g_form.getControls('some_field').forEach(function(e) {
                if(answer == 'USGCI Structured')
                    comparevalue = 'USGCI-struct';
                else if(answer == 'USGCI Unstructured')
                    comparevalue = 'USGCI-unstruct';
                else if(answer == 'None')
                    comparevalue = 'none';  
                if(answer == '' || answer == 'None' )
                {
                    if (e.value == 'none')
                    e.parentElement.style.display = 'none';
                }
                if (e.value == comparevalue)
                    e.parentElement.style.display = 'none';
            });
How can i achieve same in portal. I have tried several posts but not yet got he solution on this. for example 
angular.element($("sp-variable-layout")).scope().getGlideForm().getControl('some_field')
 
Thanks in advance.
 
0 REPLIES 0