This topic is locked

Custom Message after record added

9/14/2024 5:06:34 PM
PHPRunner General questions
A
asawyer13 authorDevClub member

Trying to display custom message after record is added.

$pageObject->setMessageType(MESSAGE_INFO);
$pageObject->setMessage("Checkin was successful");

It adds the record but no message. I do have add page set to "after record is added, add next record - stay n add page"

Alan

Davor GeciDevClub member 9/15/2024

Hey asawyer13,
I think that you don't see the message because the message is displayed, but the page reloads and that is why you "don't get to see it".
I would go with a trick that Sergey explained in another forum post. To trigger a session variable and display an alert or swal message in Javascript.

Here is the link to the post:
https://asprunner.com/forums/topic/27373-pop-up-message-after-addedit

Sergey Kornilov admin 9/15/2024

Definitely works here.

img alt