Auto Copy Text From One Field To Another – jQuery Plugin To autofill

Autofill is a fast, easy and useful jQuery plugin that automatically copy and fill out text input fields from another text input fields. Useful to prevent from having to fill out the form twice or more.

How to use it:

1. Load the jQuery javascript library and jQuery autofill plugin in the page.

<script src=""></script>
<script src="jquery.autofill.js"></script>

2. Html

<label for="fname">Firstname</label>
<input id="fname" name="fname" type="text"/>
<label for="lname">Lastname</label>
<input id="lname" name="lname" type="text"/>
<label for="cemail">E-Mail</label>
<input id="cemail" type="text" name="cemail"/>
<input id="firstname" name="firstname" type="text" />
<label>Filled first time.</label>
<label for="lastname">Lastname</label>
<input id="lastname" name="lastname" type="text" />
<label>Filled first time.</label>
<label for="uemail">E-Mail</label>
<input id="uemail" type="text" name="uemail"/>

Call the plugin after DOM ready.

$().ready(function() {
fieldId : "firstname",
overrideFieldEverytime : false
fieldId : "lastname",
overrideFieldEverytime : false
fieldId : "uemail",
overrideFieldEverytime : true


Please follow and like us:

Leave a Comment

Your email address will not be published. Required fields are marked *