Posts

Showing posts from August, 2023

Power Pages - Make Multi-Select Fields Read only on Power Portals

Image
Hello and welcome to another Javascript post on Power Pages. You can easily find posts on how to set attributes as read-only on Power Pages, but setting a multi-select field as read-only is a little bit challenging. Set Text Field Read Only $("#<attribute name>").attr("readonly", true); Set Multi-Select Read Only $("<div></div>").css({   position: "absolute",   width: "100%",   height: "100%",   top: 0,   left: 0,   background: "" }).appendTo($(".control").css("position", "relative")); By using the code above, you can easily set the multi-select field as read-only this won't hide the selected options.