{{ ApiRef() }}
The HTMLFieldSetElement
interface special properties and methods (beyond the regular {{domxref("HTMLelement")}} interface it also has available to it by inheritance) for manipulating the layout and presentation of field-set elements.
Properties
Inherits properties from its parent, {{domxref("HTMLElement")}}.
Name | Type | Description |
---|---|---|
disabled |
{{domxref("Boolean")}} | Reflects the {{htmlattrxref("disabled", "fieldset")}} HTML attribute, indicating whether the user can interact with the control. |
elements {{readonlyInline}} |
{{domxref("HTMLFormControlsCollection")}} | The elements belonging to this field set. |
form {{readonlyInline}} |
{{domxref("HTMLFormElement")}} | The containing form element, if this element is in a form. If the button is not a descendant of a form element, then the attribute can be the ID of any form element in the same document it is related to, or the null value if none matches. |
name |
{{domxref("DOMString")}} | Reflects the {{htmlattrxref("name", "fieldset")}} HTML attribute, containing the name of the field set, used for submitting the form. |
type {{readonlyInline}} |
{{domxref("DOMString")}} | Must be the string fieldset . |
validationMessage {{readonlyInline}} |
{{domxref("DOMString")}} | A localized message that describes the validation constraints that the element does not satisfy (if any). This is the empty string if the element is not a candidate for constraint validation (willValidate is false ), or it satisfies its constraints. |
validity {{readonlyInline}} |
{{domxref("ValidityState")}} | The validity states that this element is in. |
willValidate |
{{domxref("Boolean")}} | Always false because {{HTMLElement("fieldset")}} objects are never candidates for constraint validation. |
Methods
Inherits methods from its parent, {{domxref("HTMLElement")}}.
Name & Arguments | Return | Description |
---|---|---|
checkValidity() |
{{domxref("Boolean")}} | Always returns true because {{HTMLElement("fieldset")}} objects are never candidates for constraint validation. |
setCustomValidity() |
void |
Sets a custom validity message for the field set. If this message is not the empty string, then the field set is suffering from a custom validity error, and does not validate. |
Specifications
Specification | Status | Comment |
---|---|---|
{{SpecName('HTML WHATWG', "forms.html#the-fieldset-element", "HTMLFieldSetElement")}} | {{Spec2('HTML WHATWG')}} | No change from {{SpecName('HTML5 W3C')}}. |
{{SpecName('HTML5.1', "forms.html#the-fieldset-element", "HTMLFieldSetElement")}} | {{Spec2('HTML5.1')}} | |
{{SpecName('HTML5 W3C', "forms.html#the-fieldset-element", "HTMLFieldSetElement")}} | {{Spec2('HTML5 W3C')}} | The following properties have been added: disabled , elements , name , type , valdiationMessage , validity , and willValidate .The following methods have been added: checkValidity() , setCustomValidity() . |
{{SpecName('DOM2 HTML', 'html.html#ID-7365882', 'HTMLFieldSetElement')}} | {{Spec2('DOM2 HTML')}} | No change from {{SpecName("DOM1")}}. |
{{SpecName('DOM1', 'level-one-html.html#ID-7365882', 'HTMLFieldSetElement')}} | {{Spec2('DOM1')}} | Initial definition. |
Browser compatibility
{{CompatibilityTable}}
Feature | Chrome | Firefox (Gecko) | Internet Explorer | Opera | Safari (WebKit) |
---|---|---|---|---|---|
Basic support | {{CompatVersionUnknown}} | {{CompatGeckoDesktop(1.0)}} | {{CompatVersionUnknown}} | {{CompatVersionUnknown}} | {{CompatVersionUnknown}} |
Feature | Android | Firefox Mobile (Gecko) | IE Phone | Opera Mobile | Safari Mobile |
---|---|---|---|---|---|
Basic support | {{CompatVersionUnknown}} | {{CompatGeckoMobile(1.0)}} | {{CompatVersionUnknown}} | {{CompatVersionUnknown}} | {{CompatVersionUnknown}} |
See also
- The HTML element implementing this interface: {{ HTMLElement("fieldset") }}.