angelcitymedia
9/29/2017 - 5:04 PM

Form Success Alert

Use this to customize confirmation message in gravity forms.

<!DOCTYPE html>
<html>
<head>
<style>
.alert {
    padding: 30px;
    background-color: #15659f;
    color: white;
    opacity: 1;
    transition: opacity 0.6s;
    margin-bottom: 15px;
    border-radius: 4px;
}

.alert.success {background-color: #15659f;}

.closebtn {
    margin-left: 15px;
    color: white;
    font-weight: bold;
    float: right;
    font-size: 22px;
    line-height: 20px;
    cursor: pointer;
    transition: 0.3s;
}

.closebtn:hover {
    color: black;
}
</style>
</head>
<body>
<div class="alert success">
  <span class="closebtn">&times;</span>  
  <strong>Success!</strong> We will review the information and follow up with you shortly.
</div>
<script>
var close = document.getElementsByClassName("closebtn");
var i;

for (i = 0; i < close.length; i++) {
    close[i].onclick = function(){
        var div = this.parentElement;
        div.style.opacity = "0";
        setTimeout(function(){ div.style.display = "none"; }, 600);
    }
}
</script>

</body>
</html>