Form
Use $. Post (
"/Member/book/" + event_id,
{
Tickets: tickets,
Csrf_ppw_token: csrf_ppw_token,
Event_id: event_id,
},
You can pass tickets values to an array of objects.
Browser caputure is
Tickets [0] [fullname]:
Tickets [0] [telephone]:
Tickets [0] [email]:
Tickets [0] [Company]:
Tickets [0] [role]:
Tickets [0] [cat_id]: 1
Tickets [1] [fullname]: B
Tickets [1] [telephone]:
Tickets [1] [email]:
Tickets [1] [Company]:
Tickets [1] [role]:
Tickets [1] [cat_id]: 1
Csrf_ppw_token: 575b56d0fa9aba282a0f0e4e8dc14c86
Event_id: 1
The server can also use _ post ["tickets"] to obtain this data, but it is not an array of objects, but a two-dimensional array.
When using jquery form, you can manually process formdata,
VaR temp = new object ();
Temp. Name = "tickets ";
Temp. value = tickets ;.
The objects uploaded at this time are all stored in the browser caputure
Tickets: [object], [object]
In this case, assign values using the following method:
VaR ticket = new object ();
Ticket. Name = "tickets [" + I + "] [fullname]";
Ticket. value = $ (this). Find ($ ("[name = 'fullname']"). Val ();
Formdata. Push (ticket );
Formdata is an array of objects.