When users click a "submit" button, the app can show a confirm dialog by
:confirm => "Are you sure?"
I need to let it appear if certain conditions are met. It does not
appear if the conditions are not met although the submit action would
checkbox is checked or not.
function sees if the checkbox status: the dialog appears if checked and
submit action follows as users confirm it. The dialog does not appear
but submit action gets executed without confirmation.
Could anyone give me some ideas how to implement something described?