How to get all form value and serialize multiple select with a given variable or an array?
output parameter must be;
id=1&name_1=John&name_2=Juan&name_3=Isabel&name_4=Doe
where the name is in multiple select
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
As this answer demonstrates, jQuery will use the same ‘name’ value as the key for each selection when serializing via
$(form).serialize():and it’s up the server to understand how to handle it. Chances are that your server will handle it just fine.
If you absolutely require the format you mentioned, you should be able to hack it together using something like this (untested):