web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Microsoft Dynamics 365 | Integration, Dataverse...
Suggested answer

Hide Quick view control label in power pages

(0) ShareShare
ReportReport
Posted on by 89
Hello,
 
I have a lookup field to be displayed in the power pages form, the quick view control is added to show the details for that lookup field. But I want to hide the quick view control's label when no selection in lookup field. I tried to use Javascript to hide that label. but the whole quick view control does not show up when there is a selection in lookup field. below is the label needs to hide when there is no value in lookup field. we need to show the quick view when there is value in lookup field.
I have the same question (0)
  • Suggested answer
    Muhammad Shahzad Shafique Profile Picture
    2,336 Most Valuable Professional on at
    Hide Quick view control label in power pages
    function toggleQuickViewLabel(executionContext) {
        var formContext = executionContext.getFormContext();
    
        var lookupValue = formContext.getAttribute("YOUR_LOOKUP_FIELD_LOGICAL_NAME").getValue();
    
        var quickViewControl = formContext.ui.quickForms.get("YOUR_QUICK_VIEW_CONTROL_NAME");
    
        if (lookupValue != null) {
            // Show Quick View
            quickViewControl.setVisible(true);
    
            // Wait until it is loaded to hide the label
            quickViewControl.addOnLoad(function () {
                var labelElement = document.querySelector("label[for='QuickviewControlYOURCONTROLID']");
                if (labelElement) {
                    labelElement.style.display = "none";
                }
            });
        } else {
            // Hide Quick View
            quickViewControl.setVisible(false);
        }
    }
    
    Add the script to your form libraries.
    Call toggleQuickViewLabel in:
    • Form OnLoad
    • Lookup field’s OnChange
  • Suggested answer
    Varun Singh Profile Picture
    943 on at
    Hide Quick view control label in power pages
    I encountered the same issue with the Power Page portal form. It seems the new D365 Solution editor couldn't hide the label, but the old Classic Solution editor worked perfectly. Just toggle the 'Display Label' property for the quick view in the Classic editor and publish. That solved the problem for me.
     
     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

Leaderboard > Microsoft Dynamics 365 | Integration, Dataverse, and general topics

#1
Sahan Hasitha Profile Picture

Sahan Hasitha 271

#2
Sohaib Cheema Profile Picture

Sohaib Cheema 97 User Group Leader

#3
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 83 Super User 2025 Season 2

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans