I have a form in html in step by step, that when I click the "next" button I need to send the completed data by email but without finalizing the form, how can I do that, is it in php? / p>
I have a form in html in step by step, that when I click the "next" button I need to send the completed data by email but without finalizing the form, how can I do that, is it in php? / p>
You can use AJAX
, which is a mixture of PHP
and JQUERY
.
Here's an example
$(".enviar_email").click(function(){ //botão para enviar
var nome = $(this).attr("data-nome "); //variaveis
var id = $(this).attr("data-id"); //variaveis
$.ajax({
type: "POST", //Pode usar, POST ou GET. Prefiro por POST
url: "ajax/enviar_email.php", //ficheiro de envio de email com o código php nele
data: "nome ="+nome +"&id="+id, //envio de variaveis pelo que você definiu no TYPE
success: function(e){ //e equivale ao que retorna dele.
console.log(e);
}
})
})
To send an email you will need to use php as already answered in this other question here: #
What do you mean by "Without finalizing the form"? If you want the person to come back later to fill out the rest of the form without having to re-enter the other information you can use html5 and the localstorage to do so by storing the information inside the user's browser. Follow link with explanations: link
If you want this information to be accessed from another browser or from another computer, you will need to store it in a database.