- Carregar o script para mascara de telefones
<script src="/wp-content/themes/<child_theme>/js/maskphone.js" type="text/javascript"></script>
- Carregar o formulário
Ex.: [gravityform id="1" title="false" description="false" ajax="true"]
- Aplica mascara de telefone no input_2 do gform_1
<script type="text/javascript">
mascaraTelefone(gform_1.input_2); // Form ID e NAME input
</script>
- Altera o tipo dos campos
<script type="text/javascript">
window.addEventListener('load', function() {
document.getElementById('input_1_2').type = 'email'; // Altera field email
document.getElementById('input_1_3').type = 'tel'; // Altera field telefone
document.getElementById('input_1_5').type = 'tel'; // Altera field idade do aniversariante
document.getElementById('input_1_9').type = 'tel'; // Altera field data da festa
document.getElementById('input_1_7').type = 'tel'; // Altera field numero convidados
})
</script>