Power Pages - Multi Select Field Show Hide and Set Business Required Using Javascript
In this Power Portals blog post content, we are going to implement a multi-select field and use JavaScript to hide and show it based on user interactions. Enhance user experience and streamline data entry by revealing the field only when needed. At the end of this post, you'll be able to hide and show fields based on the option selected in the multi-select field and make it business required as these two options are not available out of the box in power pages. Add the below code in your basic form additional settings. Code: $(document).ready( function () { var field = document.getElementById( 'new_multiselectparentfield' ); $( "#new_multiselectchildfield" ).parent().parent().hide(); // To Hide Multi Select Field var changeField = new MutationObserver( function (mutations) { console.log( 'changed' ); onDisplaySectionChange(); }); changeField.observe(field, { attributes: true , attributeFilter: [ 'value' ] }); MakeRequired( "new_mu