Toggle navigation
Run LIVE DEMO
Show CODE
LIVE DEMO PAGE
Updated: 06.12.23 09:45
Data-copyprevious attrib demo
<!DOCTYPE html> <html> <head> <title>Data-copyprevious attrib demo</title> <!-- jQuery --> <script src="https://code.jquery.com/jquery-1.12.4.min.js"></script> <script src="http://code.jquery.com/ui/1.12.1/jquery-ui.min.js"></script> <!-- Bootstrap --> <link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet" /> <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script> <!-- Smartapp --> <script src="https://smartform.ikx.no/downloads/jquery.smartform.js"></script> <style> .autoinsert { opacity:0.5; } .autoinsert [data-action] { display:none; } </style> </head> <body> <form class="container" id="TestForm"> <table class="table table-striped table-bordered table-hover"> <thead> <tr> <th>Column 1</th> <th>Column 2</th> <th>Column 3</th> <th>Column 4</th> <th></th> <th></th> </tr> </thead> <tbody data-array="Items" data-autoinsert="1" data-remove="1"> <tr> <td data-func="input" data-copyprevious="1" data-name="Field1" data-placeholder="(text)"></td> <td> <input type="number" placeholder="(number)" data-copyprevious="1" name="Field2" class="form-control"/> </td> <td> <input type="checkbox" data-copyprevious="1" name="Field3" /> </td> <td> <select data-copyprevious="1" class="form-control" name="Field4"> <option>Option 1</option> <option>Option 2</option> <option>Option 3</option> </select> </td> <td> <a class="btn btn-default" data-action="remove"></a> </td> <td> <a class="btn btn-default" data-action="sort"></a> </td> </tr> </tbody> </table> </form> <script> $(function() { // Initialize app on a DOM container element var $form = $("#TestForm").smartform(); }); </script> </body> </html>