The form
attribute on an <object> tag specifies the form the object is associated with.
Although linked to the form, the object is not included in form submission.
An <object> element with a form attribute. The embedded image is associated with the form above it.
<form action="/tutorial/action.html" id="document-form"
oninput="result.value = slider.value">
<fieldset>
<legend>Art Information</legend>
<input type="text" name="name"
placeholder="Title of painting"><br /><br />
<input type="submit" value="Submit">
</fieldset>
</form> <br />
<object form="document-form" data="/img/html/poppies.jpg"
type="image/jpg" name="poppies">
</object>
Note: The object value is not submitted during form submission.
The form attribute specifies the form the object is associated with.
The attribute value is the id of the form.
The object value is not included during form submission.
Note: The form attribute on the object tag has been deprecated.
<object form="form-id">
Value | Description |
---|---|
form-id | The id value of the form. |
Here is when form support started for each browser:
Chrome
|
Not Supported | |
Firefox
|
Not Supported | |
IE/Edge
|
Not Supported | |
Opera
|
Not Supported | |
Safari
|
Not Supported |
Back to <object>