You need to sign in to do that
Don't have an account?
Himanshu Patel 55
how to show a section in Visualforce page based on Boolean field
We have a requirement to show a particular section of VF page to only few Users of Community. I am planning to create a Checkbox field and based on this section will appear. Below is the VF Code and wanted to show section only if Checkbox is true.
<div class="rc-grid"> <article class="rc-card rc-card--b " style="align-items:center;"> <picture class="rc-card__image rc-padding-top--md"> <img src="{!URLFOR($Resource.HomeAssets,'./assets/images/Icon_eLearning.png')}" height="100px" width="100px" alt="E-learning Icon" /> </picture> <div class="rc-card__body "> <header> <h1 class="rc-card__title rc-delta">{!$Label.pRStart}<br class="rc-xs-up" /></h1> </header> <p class="rc-margin-bottom--sm--mobile">{!$Label.pRStartDesc} </p> </div> <div class="rc-card__footer "> <a href="https://b.rcn.com/login" class="rc-btn rc-btn--one" aria-label="Button">{!$Label.pRStartLogin} </a> <p> or</p> <a href="https://welcome.rc.com/?redirect_uri=https:%2F%2Fb.rc.com%2Fimplicit%2Flogin" class="rc-btn rc-btn--one" aria-label="Button">{!$Label.proRTCreateAccount}</a> </div> </article> </div> </div> </section>
I think you have to use rendered attribute .
Please check belo link for reference
https://stackoverflow.com/questions/9395639/can-i-show-an-outputfield-or-inputfield-based-on-a-boolean-variable-in-vf-page/9396145
Thanks!