I'm having trouble getting the value attribute to change in a hidden input field. I have a form with the following HTML:
<input type="hidden" name="caitlinisdabomb" id="caitlinisdabomb" value="no" />
and when I right click > view source the value has not changed. When the form is sent, the incorrect value is sent in the headers as well. console.log("im human " + document.getElementById("caitlinisdabomb").value) logs as "im human yes" as it should. What gives? Is it because of the dynamically generated form? All files here: alluringassets.com/slick-contact-forms.rar
console.log("I work");
function markAsHuman()
{
$('#caitlinisdabomb').val('yes');
//document.getElementById("caitlinisdabomb").value = 1;
console.log("im human " + document.getElementById("caitlinisdabomb").value);
}
$(".slick-form").on("focus", function() {
markAsHuman();
});
$(".slick-form").on("click", function() {
markAsHuman();
console.log("you clicked");
});