how to show the different required message for the same field?

Certified Senior Developer

Hi,

We have requirement like need to show different required message(dynamic message) for a particular field based on two different button clicks.

here are the more details like we have one comments field which is required for both the submit buttons with names like "Add More Info" and "Add More Comments" .

when the user clicks on "Add More Info" button without providing the comments then need to show the required message is like "comments required for More Information".

when the user clicks on "Add More Comments" button without providing the data to comments field then need to show the required message like "comments should not be blank"

 

Can some one suggest any way to achieve this...

-Ram

  Discussion posts and replies are publicly visible