cancel
Showing results for 
Search instead for 
Did you mean: 
ragavanrajan

Disable toggle navigation for specific web page in Power Apps Portal

 

Scenario: 

 

You may have the scenario where you want to disable the toggle navigation button (image below) for specific web page. Ex: Contract agreement web page or Terms and Condition web page.  Where you dont want users to navigate to different links while reading T&C. 

 

In PowerApps Portal > Choose  any web page in responsive mode. You can see the below toggle navigation button.  This occurs because of the bootstrap theme. 

 

ragavanrajan_0-1613431591290.png

 

Solution:  In Terms and Condition Web page. 

 

In Portal management app:

 

1. Content > Web Pages > TermsAndCondition (Name of the web page) 

2. Under Localized Content > Select web page > Edit > Advanced 

 

Under Custom JavaScript section: Add the below JavaScript code to hide the toggle navigation bar element 

 

document.getElementsByClassName("navbar-toggle collapsed")[0].style.visibility = "hidden";

 

Hint: You can also apply jQuery as a replacement to hide your element. 

 

Hope this little trick is useful incase if you have the same scenario in your organization. 

 

Meet Our Blog Authors
  • PowerApps Community Mentor 2018, Practicing surgeon and former Professor of Surgery, University of Illinois, Chicago.
  • Jill of All Trades (Power Apps, SharePoint, PowerShell, Exchange, Power Automate and odds & ends of assorted other things)
  • I am the Owner/Principal Architect at Don't Pa..Panic Consulting. I've been working in the information technology industry for over 30 years, and have played key roles in several enterprise SharePoint architectural design review, Intranet deployment, application development, and migration projects. I've been a Microsoft Most Valuable Professional (MVP) 12 consecutive years and am also a Microsoft Certified SharePoint Masters (MCSM) since 2013.
  • I'm Tim Leung - a PowerApps builder. In addition to PowerApps, my main interests include building software with SQL Server and Microsoft .NET. I'm the author of 'Beginning PowerApps' - the first published book on PowerApps. You can buy this from Amazon and other leading bookstores.
  • Systems developer
  • My name is Timothy Shaw and I create digital solutions using the Power Platform, Office 365, and Azure SQL and handle the IT for a small company in the energy sector. When not building the future :), I enjoy playing guitar, good (or really bad!) sci-fi, Xbox therapy, and hanging with my wife and son. Twitter: @ShortForTim