Conditional form submit with UI

lcollong

FabriKant d'applications web
Hi,

I'm trying to have a way to cancel a form submission based on a human decision (go ahead / cancel).
There is a confirmation form plugin which does some of the job. But it runs each time.

The use case is the following :
One edit a form. If some specific fields has changed (not all are checked) then ask him if he is sure to do so (double check confirmation).
It's easy to use onBeforeProcess to check is these fields have changed using origData object and return false to stop submiting. But how display something (a page, a popup, some js) to ask the user if he is sure (continue and submit) or not (cancel and return to the form) ?

Of course I can do all using ajax to catch the click on submit, get the fields I want in the DOM, send a request to the server to catch the original data from the DB (or from the url ?), compare and if something has changed issue a popup to continue or cancel...

But may be there is something clever ?

Any idea welcome :)

Laurent
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top