Jump to content

insert multiple form fields..


techker

Recommended Posts

Hey guys i have an invoice template the fields are basic..price ,business.....

 

but in the invoice section i have a add field button to add more items..(attached pic.)

 

 

So how can i insert these extra fields in my database?cause it will insert all in one field..

 

database:Invoice

 

I_ID

Business

Client_ID

Store

 

Item

Description

 

 

total

total_tax

 

 

 

post-9584-0-26041200-1385215806_thumb.png

Link to comment
https://forums.phpfreaks.com/topic/284197-insert-multiple-form-fields/
Share on other sites

the JS file is

 

 $("#addrow").click(function(){
    $(".item-row:last").after('<tr class="item-row"><td class="item-name"><div class="delete-wpr"><textarea  name="Item">Item Name</textarea><a class="delete" href="javascript:;" title="Remove row">X</a></div></td><td class="description"><textarea  name="Description">Description</textarea></td><td><textarea class="cost">$0</textarea></td><td><textarea class="qty">0</textarea></td><td><span class="price">$0</span></td></tr>');
    if ($(".delete").length > 0) $(".delete").show();
    bind();
  });
 
is there a way to random the textarea name?like item2 description2....

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.