0
I need the script to send my form to two places and after sending to the reply page.
<script type="text/javascript">
function EnviaForm2()
{
document.getElementById('formnewsletter').action = 'https://docs.google.com/forms/d/e/1FAIpQLSc-wUHrhJZxfdWB7Ia_-8FxPU7o4KiL0pqVtnV0Miay_h9XxQ/formResponse';
document.getElementById('formnewsletter').submit();
}
function enviaForm(nome,email){
$.ajax(
{
type: "POST",
url: "enviar.php",
data: "&nome="+nome+"&email="+email,
beforeSend: function() {
},
success: function(txt) {
if(txt.status=='success')
window.location.href = "https://www.paginaresposta.com";
else
alert("E-mail não cadastrado.");
EnviaForm2();
},
error: function(txt) {
}
}
);
}
</script>
Can you explain it better? do you want PHP to run a script? Explain what functionality you want and what should happen.
– Sergio
I rephrased the question
– Bruno Aguiar