How to identify the text box post of multiple rows. This is to modify data, multiple rows, and multiple columns.
How to design the text box.
Each line has a name text box. how can I name it better? when I save it, how can I know which line to save.
If I define the name text box and the name is "xingming", it is clear that the name text box names of multiple rows are all "xingming". Is this a conflict. Psot cannot identify which one is. Very tangled.
Do you have any friends who have done this? give me a solution. Tangle.
Reply to discussion (solution)
Don't you have a saved button next to each other? you just need to get a click event and add a suffix to it. it's just xingming1 xingming2.
Don't you have a saved button next to each other? you just need to get a click event and add a suffix to it. it's just xingming1 xingming2.
How do I know this line? during the submission, I click the save button of the row to submit it.
Each row uses a form.
All parameters of each row are distinguished by the data ID or unique field.
Each row uses a form.
This is a waste. If there are 100 rows, will I use 100 forms?
All parameters of each row are distinguished by the data ID or unique field.
How can this problem be solved? it's a bit dizzy.
Since each row has a submit button, what is the waste of a form in each row?
Is it a waste of data if a single row of data is submitted for a form of 100 rows?
Is it a waste of data if a single row of data is submitted for a form of 100 rows?
Oh! It is true that,
Are you sure you want to submit ajax or form refresh?
You can use AJAX to submit your data. isn't the first field of your data having an ID? in the save button, make an onclick = postdata ($ id) event, put the name, age, the value of name in height input is: name _ $ id, age _ $ id, age _ $ weight, then, in the postdata function, obtain the three input values based on the passed $ id parameter, and then submit
The preceding error indicates that age _ $ weight should be weight _ $ id.
Are you sure you want to submit ajax or form refresh?
Ajax submit. it is estimated that you have to use your method to submit multiple forms.
It seems that a form is OK. Pass a parameter to js, process it in js, and submit it.
I was just lazy and submitted it with post refresh. Use multiple forms. Haha