0

I have forms:

<form action="" method="post" id="form1">
    [many inputs, selects etc - form is used to filter the displayed results]
</form>

[content]
<table ...>
  <tr>
     <td>...<td>
     <td>
       <form action="" method="post" id="form2">
         [some inputs on row]
         <input type="submit" name="updaterow" value="Update row" />
       </form>
     </td>
  </tr>
</table>

And I want to copy data of inputs from form1 to form2 when I click submit button on form2. How to do it?

Nips
  • 13,162
  • 23
  • 65
  • 103

1 Answers1

0

if both forms have same elements name then you can use this plugin like :-

$("#form2").values($("#form1").values()); 

if not then--
here is working FIDDLE

Community
  • 1
  • 1
vikrant singh
  • 2,091
  • 1
  • 12
  • 16