To submit my form, the user need choice the price of your ticket by html droplist.
Here is JS the code:
var ticket = document.getElementById('ticket-box'); var member = document.getElementById('member'); var form = document.getElementById('form'); form.style.display = 'none'; ticket.style.display = 'none'; member.addEventListener('change', function() { var chosen = member.options[member.selectedIndex].index; if(chosen == 1) { form.style.display = 'inline-block'; ticket.style.display = 'inline-block'; form.selectedIndex = 2; form.options[0].style.display = 'none'; form.options[1].style.display = 'none'; form.options[2].style.display = 'inline-block'; form.options[3].style.display = 'inline-block'; form.options[4].style.display = 'none'; form.options[5].style.display = 'none'; $ (function() { $ ('#btnget').click(function(e) { let formValido = document .getElementById("formulario") .checkValidity(); if(formValido){ $ ("#formulario") .attr("action", $ ('#form').val()) .submit(); } }) }); } });
This only works in chrome (email is comming only in chrome).
Why is this happening?
form link: http://www.congressoprotecaodados.com.br/inscricao/form22.html