Dofactory.com
Dofactory.com
Earn income with your HTML skills
Sign up and we'll send you the best freelance opportunities straight to your inbox.
We're building the largest freelancing marketplace for people like you.
By adding your name & email you agree to our terms, privacy and cookie policies.

HTML <object> form Attribute

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.

Example

#

An <object> element with a form attribute. The embedded image is associated with the form above it.

Art Information


<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.


Using form

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.


Syntax

<object form="form-id">

Values

#

Value Description
form-id The id value of the form.

Browser support

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

You may also like

 Back to <object>

Last updated on Sep 30, 2023

Earn income with your HTML skills
Sign up and we'll send you the best freelance opportunities straight to your inbox.
We're building the largest freelancing marketplace for people like you.
By adding your name & email you agree to our terms, privacy and cookie policies.

Guides