I have a simple form with the following text fields: name, post, mobile and email. I want to make the 'email' field fill in the 'name' field automatically as follows: for example, if the 'name' field is filled in with 'José da Silva' the 'email' field would fill automatically and in real time with "[email protected]". What is the simplest way to get there?
My form:
<form name="formulaio" method="post" action="<?=$PHP_SELF?>">
<label>
<span>Nome:</span>
<input type="text" name="nome" /><br>
</label>
<label>
<span>Cargo:</span>
<input type="text" name="cargo" /><br>
</label>
<label>
<span>Celular:</span>
<input type="text" name="celular" /><br>
</label>
<label>
<span>e-mail:</span>
<input type="text" name="email" /><br>
</label>
<input type="hidden" name="acao" value="enviar" />
<button type="submit" class="envio" title="Enviar"></button>
</form>