I want users to confirm a web form action in a standard template before its POST'ed to prevent them accidentally erasing some data in the next function.
I have this script in my html which returns true or false on test, but can't find if its possible to pass this onto the connected function node as a payload?
<script>
function confirm() {
var result = confirm("If you click OK your access key will be overwritten");
if (result == true) {
**I want to pass true as the payload**;
} else {
**I want to pass false as the payload**;
}
}
</script>
In my html body:
<form ="form" action="http://1.2.3.4:1880/updateKey?" method="post">
<input type="submit" onclick="confirm()" class="button" value="Update" />