Timed message on record add |
11/30/2024 1:16:58 PM |
PHPRunner General questions | |
A
asawyer13 authorDevClub member
I generally do this on a record add $pageObject->setMessageType(MESSAGE_INFO); Works well but in this case I'm staying on the add page and I don't want the user to enter information and think they've already saved it. Is there a way to remove the "The data was successfully saved" message after 3 or 4 seconds, os replace it totally with a popup message that shows for 3 or 4 seconds? Thanks |
|
D
|
DRCR Dev 12/5/2024 |
HI Instead of the message, I would load a session variable, if the session equals something, break out of PHP and run a sweetalert timed popup that closes after a period time and break back into PHP. The code for ther sweetalert2 popup is on the sweetalert code page. |
M
|
MikeUk 12/5/2024 |
Another way is to use the sweetalert toast option, you can add a timer in miliseconds after which time it closes. I wroteand added this to custom_function.js showToast('title', 'message', 'icon' seconds, position); icons 'e' Error, 'i' Info, 'w' Warning and 's' Success. function showToast(title, message, imgIcon, duration, fc) { |