If I do not specify name attribute within tag, is everything within form is submitted successfully?
I know that without name is not submitted in either GET or POST
<form>"Is form submitted if tag has no name attribute (and child elements within form do have name attribute?"
[name] and nested within a <form>2 tag are submitted with one exception: <output>. If you want to send the value of an <output> just copy it over to a <input type='hidden'>.[name] attribute to send values of its children tags or for itself (since forms actually don't have value attributes).[name] -- only the value of the selected radio button is submitted.<button> tag has when nested within a form it will act as a <input type="submit">. So remember to add type="button" to <button>s that are just buttons to trigger a click event instead of a submit event.1Children tags of a <form> tag that have the [name]/value sent during a submission is known as successful controls.
2If a form control is not a child of a form, an association can be enabled by assigning the control form="FORMID"
<form>[action]: Sends to a live test server[target]: [name] of an iframe that displays the server's response[onchange]: Whenever the user leaves data on the form -- <output> displays the value of the selected radio button and <output> assigns the value to the hidden input as well.#ui {
width: 300px;
}
#out,
button,
[type=submit] {
float: right;
}
<form id='main' action='https://httpbin.org/post' method='post' target='response' onchange='out.value = rad.value; inv.value = out.value; return false'>
<fieldset id='ui'>
<legend>Submitting a Form</legend>
<fieldset>
<input id='xA' name='rad' type='radio' value='A'> A
<input id='xB' name='rad' type='radio' value='B'> B
<input id='xC' name='rad' type='radio' value='C'> C
<input id='xD' name='rad' type='radio' value='D'> D
<output id='out' name='out' for='xA xB xC xD inv'></output>
<input id='inv' name='inv' type='hidden'>
</fieldset>
<button><button></button>
<input type='submit'>
</fieldset>
</form>
<iframe name='response'></iframe>
yes form will submit even if it has not no name. check the code below it will explain you.
Click on the submit button form will submit, even if it does not have name,action etc. submit button is enough to submit the form.
If you dont mention meathod then default submit type is "Get" meathod
<form action='/cloud' meathod="get">
<input type ="submit" value="submit"/>
</form>
Yes!
FYI - use of name attributes on forms are deprecated for id in HTML5. See the MDN note about it.
The name of the form. In HTML 4, its use is deprecated (id should be used instead). It must be unique among the forms in a document and not just an empty string in HTML 5.
Edits:
<input> name attributes are deprecated.
[name]are submitted with one exception:<output>. If you want to send the value of an<output>just copy it over to a<input type='hidden'>. Also, if you have a group of radio buttons that have the same[name]-- only the value of the selected radio button is submitted.