Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

327
Visualizações
Is there a way to submit my form to both a url and send data to an email?

Hey guys I have a simple form which needs to post to a url however i would also like the data to be sent to an email. Is this possible?

Here is my current code:

"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Test Form - Overture</title>
<script src="https://ajax.aspnetcdn.com/ajax/jQuery/jquery-2.1.3.js"></script>
<script src="https://malsup.github.io/jquery.form.js"></script> 
 
<script> 

// Form to submit via ajax.

$("form").ajaxForm({
"clearForm": false,
"resetForm": true,
"beforeSubmit": function() {
},
"success": function(json) {
if (json.success == true)
{
// Form has submitted successfully.
alert("Thank you for getting in touch.");
window.location.href = "https://www.activetalentagency.com/booking-request-confirmation";

} else {
for (name in json.errors) {
$("form").find("[name$='" + json.errors[name] + "']").css("border-color", "red");
};
};
},
"error": function() {}
});
</script> 

</head>

<body>

<form method="post" action="https://overturehq.com/formapi/webform/submit.json">

<h2>Test Form</h2>
 <label>Name:</label>
<input type="text" name="personName" required>
<label>Email Address:</label>
<input type="text" name="personEmailWork" required>
<label>Phone Number:</label>
<input type="text" name="personPhoneWork" required>
<label>What would you like to discuss with us?</label>
<textarea name="personNote"></textarea>

<input type="submit" value="Send Enquiry">
<input type="hidden" name="key" value="MTI4NzQxNTE1NzI=">
</form>
</body>
</html>

Im hoping there might be a way even if its collecting the data somehow and then submitting it to both places email and url.

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

Yes, you can asynchronously post the data to a URL and in the same function use a module like nodemailer to asynchronously generate and send an email with the same data. You can really do anything you want to do.

about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda