Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New Coder
    Join Date
    Sep 2005
    Posts
    42
    Thanks
    4
    Thanked 0 Times in 0 Posts

    insert multiple form fields..

    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


    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....
    Attached Thumbnails Attached Thumbnails insert multiple form fields..-save.png  

  • #2
    Senior Coder
    Join Date
    Dec 2005
    Location
    Slovenia
    Posts
    1,958
    Thanks
    120
    Thanked 76 Times in 76 Posts
    is there a way to random the textarea name?like item2 description2..
    It is but then that random stuff you would have to have saved somewhere on server, in order to be able to read stuff upon submission.


    If that extra text areas will be created on client side, I think server will not be able to read it. Possibly I'm wrong.

    Better create stuff on server, style = visibility:none or display:none, one of those should do.
    Found a flower or bug and don't know what it is ?
    agrozoo.net galery
    if you don't spot search button at once, there is search form:
    agrozoo.net galery search


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •