Must the data to be submitted be placed in the input or textarea labels? Isn't it possible to put it in another label? For example, why not use the span tag? What if it is inconvenient to use input or textarea? Must the data to be submitted be placed in the input or textarea labels? Isn't it possible to put it in another label? For example, why not use the span tag? What if it is inconvenient to use input or textarea?
Reply content:
Must the data to be submitted be placed in the input or textarea labels? Isn't it possible to put it in another label? For example, why not use the span tag? What if it is inconvenient to use input or textarea?
Yes. then you can use js to get the content of these labels, assemble them into the data to be submitted, and submit them to the backend through ajax.
A simple html form must be submitted, but if JavaScript is used for processing, you can simply put it as long as you can get the value through js ..
Form submission
How does a browser submit a form, or what does a browser do when submitting a form.
Instead of sending all the form controls to the server, the browser searches for all the successful controls and only sends the data of these successful controls to the server. what is a successful control?
To put it simply, the successful control means that each control in the form should have a name attribute and "current value". when submitting, they are used as part of the submitted data in the form of name = value.
In some special cases, the successful control also has the following rules:
The control cannot be in the disabled status, that is, specify disabled = "disabled "]. That is, the disabled control is not a successful control.
If a form contains multiple submission buttons, only the submitted button clicked by the user is a successful control.
For the checkbox control, only checked by the user is a successful control.
For a radio button, only the one selected by the user is a successful control.
For the select control, all selected options are used as successful controls, and the name is provided by the select control.
For the file upload control, if it contains the selected file, it will be a successful control.
In addition, the browser does not consider Reset buttons and OBJECT elements.
Note:
For checkbox and radio buttons, if they are confirmed as successful controls but do not specify the value attribute for the controls, they will use "on" as their value when submitting a form.
If you cannot read the value of a form control on the server, check whether it meets the preceding rules.
So,formTable ticket submission can only recognize the precedinghtmlType, other TypeformThe submission time is not submitted to the server.
Taken from Fish Li,