1

Hi folks,
Can anyone tell me how to show the custom error message(red color) in visualforce after disabling the show header and standard stylesheet?

Below is my VFP for getting Custom Error Message

<apex:page standardController="Contact" standardStylesheets="false" showHeader="false"  >
<apex:pageBlock >   
    <apex:form >   
        <apex:pageMessages ></apex:pageMessages>   
        <apex:inputField value="{!contact.lastname}" html-placeholder="Enter Your Last Name"/>   
        <apex:commandButton action="{!save}" value="Submit"/>         
    </apex:form>     
</apex:pageBlock>   
</apex:page>  

But It gives

enter image description here

I want to display error message in red color For that What I've to do?

Thanks in advance
Karthick

Updated Code:







2

http://www.sfdcpoint.com/salesforce/show-error-message-visualforce-page/

enter image description here

I hope this will help you for sure

1

You can still use the following tag I believe

<apex:messages/>
  • @Micheal Gill: It gives same...I wanna display in red color – user3332076 Nov 29 '14 at 10:18
  • Can you not wrap it in a div or something and apply some CSS style – Michael Gill Nov 29 '14 at 13:06
0

set strandardStylesheets to true or remove it. that will give you desired result.

<apex:page standardController="Contact" standardStylesheets="true" showHeader="false"  >

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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