You need to sign in to do that
Don't have an account?
SS Karthick
Required error messaage in Visualforce page
Hi folks,
Can anyone tell me how to get 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
But the page gives lafter clicking submit button
But I want to display error message in red color.
For that what I have to do?
Thanks in advance
Karthick
Can anyone tell me how to get 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 the page gives lafter clicking submit button
But I want to display error message in red color.
For that what I have to do?
Thanks in advance
Karthick
Update your visualforce page with below code.
Visualforce Page:
Thanks and Cheers,
Jigar
All Answers
It seems that you have to deal with HTML pass-through attributes which are supported by apex:messages.
http://www.salesforce.com/us/developer/docs/pages/
I've not tried but it looks to be a solution.
Otherwise, maybe using a custom controller...
Let us know what's appens.
Regards,
Fred
Update your visualforce page with below code.
Visualforce Page:
Thanks and Cheers,
Jigar
Works fine.