On form submission does anything else get submitted but the value? Can I submit the value and the data-group attribute?
<input type="text" id="theInput" data-group="5" value="the value" />
I’m just talking about a PHP form submission
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.
Only the value gets submitted, but you can add a hidden element for the data-group value. Also note that you should use a
nameattribute to identify the parameter key:This will come back to the server with the request parameters of:
theInput⇒the valuetheInputGroup⇒5Sidenote: If you are submitting the form via ajax, you can just add the group directly into the parameter list instead of adding a hidden input.