how to hide/show div section based on the value [Yes/No] from custom label in visualforce page.

closed as off-topic by Dave Humm, David Reed, Pranay Jaiswal, battery.cord, codeyinthecloud Jan 11 at 15:11

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions on problems in code you've written must describe the specific problem and include valid code to reproduce it. For help writing short, self-contained syntactically-valid examples, see: SSCCE.org" – Dave Humm, David Reed, Pranay Jaiswal, battery.cord, codeyinthecloud
If this question can be reworded to fit the rules in the help center, please edit the question.

  • 2
    What did you tried so far. Share the code. – Tushar Sharma Jan 11 at 6:58
  • Please edit your post with any clarifications. That is not what comments are for. – Adrian Larson Jan 11 at 13:00

If you are referring html div tag then we cannot use rendered condition with them. So here you can use apex:outputPanel with layout="block" attribute.

<apex:outputPanel layout="block" rendered="{!$Label.GatwayUserNotification == 'Yes'}">
     <!-- your content -->

It will create div element for you.


You can use apex:outputPanel for this.

<apex:outputPanel rendered="{!$Label.GatwayUserNotification == 'Yes'}">
     <!-- your content -->

More on Label and apex:outputPanel

Not the answer you're looking for? Browse other questions tagged or ask your own question.