1

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

3
Contributors
2
Replies
3
Views
7 Years
Discussion Span
Last Post by JRM
0

Hi, Chandervijay

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

0

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.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.