1
I have a simple form with the following text fields: name, position, cell phone and email. I want to make sure that by filling in the 'name' field the 'email' field is automatically filled in as follows: for example, if the 'name' field is filled in with "José da Silva" the 'email' field is filled automatically and in real time with "[email protected]". What’s the simplest way to get to this?
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>