This topic is locked

Alert on Edit

PHPRunner General questions
jianwong author

I want to have a popup message when click on Edit button on list page. I read the tutorial about sweet alert, but they are for custom button I supposed. How could a standard Edit button to trigger an alert message when click? Anyone has any idea? Please enlighten.

HJB 6/17/2021

Try following (customized to your wished alert message text) by
implementation within EDIT page under "JavaScript OnLoad" event.

var popup = Runner.displayPopup( {
html: "<h1>Hello world!</h1><p>It works</p>",
header: 'Custom popup text'
admin 6/17/2021

There are multiple ways to do so but they are not straightforward.

The main question is - what is the purpose of this popup? What is that for?

jianwong author 6/18/2021

Hi Admin
Thanks for the response.
In the page there may have signatures added previously. When edit page, I will have all these signature, if any, be deleted. To let user aware of the consequences, I thought a popup aleart to confirm action would be useful.
But, if I made a copy of the Edit button that links to a different page and have the alert function in place, would it triggered the same alert when click on the copy Edit button? If so, how to have alert only on click the default Edit? Appreciate it if can offer some clues.

HJB 6/18/2021

Display a message on the webpage

It is my understanding that no stored signatures are lost until
the user ends the editing session by clicking on the save button.
So, a simple ALERT MESSAGE (Warning) should solve that issue.

admin 6/18/2021

This doesn't fully answer my question.

I understand that you need to show a warning/popup that the previous signature will be deleted. But what happens next? Do still let them proceed to the Edit page?

Because if they will end up on the Edit page anyway, then it is easier to display this warning on the Edit page itself?

jianwong author 6/20/2021

Thank you guys for all the pointers. I shall know what to do next.