You need to sign in to do that
Don't have an account?
Linda 98
Change location of error message on VF page
How can I change the location of error message.? I have a button which when clicked if required fields are not filled then I want to display error message above the button.
Now it's displaying on top of the page. I want to change the location of the error message. Changed in CSS to display bottom. Still no luck.Anything that I am missing.???
Now it's displaying on top of the page. I want to change the location of the error message. Changed in CSS to display bottom. Still no luck.Anything that I am missing.???
Greetings to you!
You can display an error message to a particular field in VF page. You need to use addError on the field in question, which also implies that you must directly bind the field to an apex:inputField. If the field is not directly bound to a visible input, it will appear at the top of the page.
Visualforce:
Controller:
Please refer to the below links which might help you further with the above requirement.
https://salesforce.stackexchange.com/questions/60141/how-to-display-different-error-messages-at-different-places-on-a-visualforce-pag
https://www.forcetalks.com/blog/adding-error-messages-to-field-inputs/
https://developer.salesforce.com/forums/?id=906F000000096mcIAA
I hope it helps you.
Kindly let me know if it helps you and close your query by marking it as solved so that it can help others in the future. It will help to keep this community clean.
Thanks and Regards,
Khan Anas