One form for each table row - Is it possible?

I would like to allow users to modify some records directly from a list in a table.

Is it possible to add a form (the same form) for each table row?
I was thinking about placing a submit button for each row.

could it be possible or should I cansider things like add one more table for each row that includes the form and different cells… or one for for all the main table using different fields names?


you’ll have to have a field in each of these rows with values that uniquely id that row.

than, you have many (many) options.

  • put an edit button on each field.
  • put a radio button on each field and a single edit button.

either way, when you press the edit button, use an already build form to show over the table’s row in question, with the row fields values in its fields.

in this form you’ll have a submit button to save the value, update the row and hide the form.

It’s possible, but I’d rather wrap a form around the entire table in that case.

There’s no problem in having lots of submit buttons in a single form. Just make sure each one has a unique name (e.g., submit-1 etc.) and your server-side script will have no problem knowing which row’s submit button was activated.

What if the form is submitted by pressing the enter key in a text field? You won’t know which row got submitted, will you?