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
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....
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.