Auto hide Warning/Error feedback message for Reactive Web/Mobile
Question

As we know for feedback message in Reactive web has autohide feature for info/success type in default. I just want to share how to implement the autohide for warning/error feedback message.


Instead using it directly from side toolbar, create a client action with javascript inside it and call the feedback message manually using Javascript API.
Add class "feedback-message-autoclose" for warning and error type. It should be type 2 and 3 according to this FeedbackMessage

So it should be like this


You also can add the message you want for each type of feedback Message.
Check above url to add another behaviour like onClick.


Cheers

Good example Hendra!

Can the feedback message settings changed with manually calling the API ? and change in all the places where ever message is defined 

 $public.FeedbackMessage.showFeedbackMessage("", 3, true, "feedback-message-autoclose", true);



Hi Namadev,

instead using default feedback message, create your own client action to trigger custom feedback message. In this client action put the javascript above. Call this client action whenever you trigger feedback message

If someone needs to copy, here it is:



var feedbackMsg = $parameters.Msg;

var feedbackType = $parameters.Type;


if(feedbackType === 0 || feedbackType === 1)

{

    $public.FeedbackMessage.showFeedbackMessage(feedbackMsg, feedbackType, true, "", true);

}

else

{

    $public.FeedbackMessage.showFeedbackMessage(feedbackMsg, feedbackType, true, "feedback-message-autoclose", true);

}

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.