Question

Hiding Button In HTML Section

Hi everyone,

I have a problem with visibility button in mobile app,
I need to hide a button when it open not by desktop version.
The problem is the section came from HTML, i want to try configure it but i think it's too risky.

I try using CSS to hide it using device-width and it not good enough because it will depends by the static value for width device.

How best way adding expression on it ?

Thank you, here i attached the HTML from the section and my CSS

Correct Answer
November 25, 2019 - 4:39am

Hi Bachtiar,

Add the following code in UserWorkForm:

  1. <style>
  2.  
  3.   <pega:when test='!pyIsMobile'>
  4.  
  5.   button#LVBViewInExcel {
  6.  
  7.     visibility: hidden;
  8.  
  9.   }
  10.  
  11.   </pega:when>
  12.  
  13. </style>

I tried it at my end and it works.

Thanks

Comments

Keep up to date on this post and subscribe to comments

November 12, 2019 - 1:11am

Hi

To hide the button you can use the syntax :

<pega:when test='pyIsMobile'>

Include code for the button

</pega:when>

Hope it helps.

Regards

Bhavya

November 12, 2019 - 2:41am
Response to Bhavya_Incessant

Thank you i will try it

November 12, 2019 - 3:12am
Response to Bhavya_Incessant

Where i can get the documentation about the HTML from pega ?

November 12, 2019 - 9:07am
Response to BachtiarL

Can you be more specific? Where is this HTML from exactly? What rule name?

November 12, 2019 - 10:21pm
Response to Rett_Hean_GCS

The Section name is : HistoryListView
Class : Work-
Ruleset :Pega-ProcessEngine:08-01-01

I was attached inside of the section.
 

The problem is when i try to configure it and open the section it comes hide so i can't configure it correctly.
Even i just change 10 px from the width at table.

Thanks

 

Pega
November 25, 2019 - 4:39am

Hi Bachtiar,

Add the following code in UserWorkForm:

  1. <style>
  2.  
  3.   <pega:when test='!pyIsMobile'>
  4.  
  5.   button#LVBViewInExcel {
  6.  
  7.     visibility: hidden;
  8.  
  9.   }
  10.  
  11.   </pega:when>
  12.  
  13. </style>

I tried it at my end and it works.

Thanks

November 27, 2019 - 1:13am

Thanks Srinivas