jQuery Plugin To Auto Copy Text From One Field To Another autofill - Download jQuery Plugin To Auto Copy Text From One Field To Another - autofill

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

Posted on

This time I will share jQuery Plugin and tutorial about jQuery Plugin To Auto Copy Text From One Field To Another – autofill, hope it will help you in programming stack.

jQuery Plugin To Auto Copy Text From One Field To Another autofill - Download jQuery Plugin To Auto Copy Text From One Field To Another - autofill
File Size: 95.3 KB
Views Total: 6887
Last Update:
Publish Date:
Official Website: Go to website
License: MIT
   

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 (e.g. domain registration).

How to use it:

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

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

2. The Html.

01 <label for="fname">Firstname</label>
02 <input id="fname" name="fname" type="text"/>
03  
04 <label for="lname">Lastname</label>
05 <input id="lname" name="lname" type="text"/>
06  
07 <label for="cemail">E-Mail</label>
08 <input id="cemail" type="text" name="cemail"/>
09  
10 <input id="firstname" name="firstname" type="text" />
11 <label>Filled first time.</label>
12  
13 <label for="lastname">Lastname</label>
14 <input id="lastname" name="lastname" type="text" />
15 <label>Filled first time.</label>
16  
17 <label for="uemail">E-Mail</label>
18 <input id="uemail" type="text" name="uemail"/>

3. Call the plugin after DOM ready.

01 <script>
02 $().ready(function() {
03 $("#fname").autofill({
04 fieldId : "firstname",
05 overrideFieldEverytime : false
06 });
07      
08 $("#lname").autofill({
09 fieldId : "lastname",
10 overrideFieldEverytime : false
11 });
12  
13 $("#cemail").autofill({
14 fieldId : "uemail",
15 overrideFieldEverytime : true
16 });
17  
18 });
19 </script>

Change log:

2017-06-05

  • Version 1.2.1

This awesome jQuery plugin is developed by harshen. For more Advanced Usages, please check the demo page or visit the official website.

source : jqueryscript.net