Input Hidden form Attribute

Definition and Usage

form The property returns a reference to the form containing the hidden input field.

This property returns the form object on success.

Note:This property is read-only.

Example

Return the id of the form containing the <input type="hidden"> element:

var x = document.getElementById("myInput").form.id;

Try It Yourself

Syntax

hiddenObject.form

Technical Details

Return Value:

Reference to the form element containing the hidden input field.

Returns if the hidden input field is not in the form. null.

Browser Support

Chrome Edge Firefox Safari Opera
Chrome Edge Firefox Safari Opera
Support Support Support Support Support