Forums

chronoforms v5 how to customize alert box with jquery

Bacci 19 Jul, 2019
Good morning,

I would like to customized alert box in chronoforms v5 using event switcher sections :
I found this code below, but I don't really know how to start in chronoforms form the script ; infact in the example below there is a button (onclick) that starts the function...
how do I start that function in chronoforms?
<!DOCTYPE html>
<html>
<head>
<script src="https://unpkg.com/sweetalert/dist/sweetalert.min.js"></script>
<link rel="stylesheet" href="alert/dist/sweetalert.css">
</head>
<body>
<button onclick="JSalert()">Show an Alert</button>

<script type="text/javascript">
function JSalert(){
swal("WARNING");
}
</script>
</body>
</html>
healyhatman 20 Jul, 2019
just add the onclick="JSalert()" to your button or element
This topic is locked and no more replies can be posted.