Duplicate Text In Multiple Input Fields - filldown

Duplicate Text In Multiple Input Fields - filldown
File Size: 5.27 KB
Views Total: 663
Last Update:
Publish Date:
Official Website: Go to website
License: MIT
   

filldown is a jQuery plugin (jQuery UI widget) that allows the users to copy text from one input field to others. The goal of this plugin is to make all the form inputs in an HTML table have the same values.

See also:

How to use it:

1. Include the necessary jQuery and jQuery UI libraries on the web page.

<script src="https://code.jquery.com/jquery-1.12.4.min.js"></script>
<script src="https://code.jquery.com/ui/1.12.1/jquery-ui.min.js"></script>

2. Include the jQuery filldown plugin's files on the web page.

<script src="jquery.filldown.js"></script>
<link rel="stylesheet" href="filldown.css">

3. Insert your input fields into an HTML table.

<table>
  <tr>
    <td><input type="text"/></td>
  </tr>
  <tr>
    <td><input type="text"/></td>
  </tr>
  <tr>
    <td><input type="text"/></td>
  </tr>
  <tr>
    <td><input type="text"/></td>
  </tr>
  <tr>
    <td><input type="text"/></td>
  </tr>
  <tr>
    <td><input type="text"/></td>
  </tr>
  <tr>
    <td><input type="text"/></td>
  </tr>
  <tr>
    <td><input type="text"/></td>
  </tr>
  <tr>
    <td><input type="text"/></td>
  </tr>
  <tr>
    <td><input type="text"/></td>
  </tr>
</table>

4. Call the function on the first input field from which you want to copy the values.

$('input:first').filldown();

5. Call the function on the first input field from which you want to copy the values.

$('input:first').filldown();

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