You need to sign in to do that
Don't have an account?
Auto Hiding HTML elements in Visualforce
Hi,
I have built a Visualforce page with Apex and html, it's linked to a button in the Visa__c object record and this button prints a contract as pdf.
I have a condition that if Opportunity_Region__c = Chengdu, then the <th> tag should not be rendered in the page.
I used this code doesn't work, although in the record I can see Opportunity_Region__c = Chengdu
Do you know what is missing?
Thanks,
I have built a Visualforce page with Apex and html, it's linked to a button in the Visa__c object record and this button prints a contract as pdf.
I have a condition that if Opportunity_Region__c = Chengdu, then the <th> tag should not be rendered in the page.
I used this code doesn't work, although in the record I can see Opportunity_Region__c = Chengdu
Do you know what is missing?
Thanks,
<br><tr> <th style="width:50%; display:{!IF(Visa__c.Opportunity_Region__c = 'Chengdu', 'block','none')}">6. Social Insurance</th> <th style="width:50%; padding-left: 20px; display:{!IF(Visa__c.Opportunity_Region__c = 'Chengdu', 'block','none')}">6. 社会保险</th> </tr></br>
Try using below which worked for me.
Please mark it as solved if my reply was helpful, it will make it available
for others as a proper solution.
Best Regards,
Sandhya
I tried your code but doesn't work for me.
The text is still rendered on the page.
This is the rendered page: