if I had a HTML form like so...
<form>
First name: <input type="text" name="firstname" /><br />
Last name: <input type="text" name="lastname" />
</form>
How would I auto fill both First name and Last Name with a default value? e.g "joe".
Thanks.
Use the value attribute.
… but please make them sensible defaults (e.g. "The user's name as stored in their account on your site") and not examples.
(And do use label elements instead of free text for your labels).
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