Can I rename a field of my form using Javascript? Like changing:
<input type="text" name="chicken" id="chicken"/>
to
<input type="text" name="horse" id="horse"/>
                Of course it is possible:
var field = document.getElementById("chicken");
field.id = "horse";  // using element properties
field.setAttribute("name", "horse");  // using .setAttribute() method
                        If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With