clearFormMessages() is not working !
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-02-2024 02:07 AM
I tried adding message by using addFormMessage() it's working fine
but i want to remove the form message so i used clearFormMessages(), it is not clearing the message
then i used clearMessages() it' s working fine, but why clearFormMessages() not working ? can any one explain
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-09-2025 03:51 AM
The clear functions like clearFormMessages('error') or even clearAllFormMessages() often don’t work as expected inside an onLoad or onsubmit client script because of timing issues.
Why clear functions don’t work well in onLoad:
When the form is loading, the messages you add (like with addFormMessage) haven’t actually been shown on the screen yet — they are just “queued” to appear.
If you call a clear function right away in the same onLoad script, it tries to clear messages before they exist visually.
So the clear call doesn’t find any message elements to remove, and nothing happens.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-09-2025 07:09 PM
Hi @nareshpittu769 ,
Have you tried clearAllFormMessages() method. Try and share feedback.
Regards,
Nikhil Bajaj
Regards,
Nikhil Bajaj