Hi,

I'm very new to web developement. I wish to develop a purchase order application wherein it has fields po_no, item, item_description, quantity, price. Out of these items po_no is common to all entries. Initially the form will have one row containing item, item_description, quantity, price. I need an option of adding multiple rows by the click of a button and the generated form fields need to have dynamic name. On submitting the form, the same must be saved in the database.

I tried out the code from

http://teamtutorials.com/web-development-tutorials/dynamically-add-textbox-to-site

but found no result.

Would be really grateful if anyone could help me out or suggest me where can i get the solution.

Regards
Vijay

Hi, Chandervijay

Can you tell me whats the problem occur by the script you used ? or you got solution for same ?

I need an option of adding multiple rows by the click of a button and the generated form fields need to have dynamic name. On submitting the form, the same must be saved in the database.

For the "instant" addition of a row, you need Javascript. see W3 for some tutorials.
The only downside is that that option won't work if the user has JS disabled on their browser.
I have even written ones that can add rows to an existing set of rows that were echoed by php by detecting the current number of rows.
I don't think you need anything that fancy though...
JS will produce any DOM element or attribute you need. Very flexible.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.