You need to sign in to do that
Don't have an account?
Dev2India
How to render pageblock and colour if field value exits
Want to display output value and colour page only if field value exists. How to do this on VF ??
<apex:page standardController="Account" showheader="False" id="test" >
<style>
.apexp, body .secondaryPalette.bPageBlock, body .individualPalette .secondaryPalette.bPageBlock
{
background-color:#F76566;
color:#000;
}
body .bPageBlock .pbBody .labelCol {
color: #000;
width:17%;
font-size:13px;
}
.body
{
font-size:14px;
font-weight:bolder;
}
</style>
<apex:form styleClass="form" >
<apex:pageBlock rendered="true">
<apex:pageBlockSection columns="1" id="myId" >
<apex:outputText styleclass="body" value="{!account.Imp_msg__c}" id="myId" />
</apex:pageBlockSection>
</apex:pageBlock>
</apex:form>
</apex:page>
Thanks for the suggestions
<apex:page standardController="Account" showheader="False" id="test" >
<style>
.apexp, body .secondaryPalette.bPageBlock, body .individualPalette .secondaryPalette.bPageBlock
{
background-color:#F76566;
color:#000;
}
body .bPageBlock .pbBody .labelCol {
color: #000;
width:17%;
font-size:13px;
}
.body
{
font-size:14px;
font-weight:bolder;
}
</style>
<apex:form styleClass="form" >
<apex:pageBlock rendered="true">
<apex:pageBlockSection columns="1" id="myId" >
<apex:outputText styleclass="body" value="{!account.Imp_msg__c}" id="myId" />
</apex:pageBlockSection>
</apex:pageBlock>
</apex:form>
</apex:page>
Thanks for the suggestions
Vi$h
In the pageBlock you could use something like this: