HtmlFormElement Class
https://html.spec.whatwg.org/multipage/forms.html#htmlformelement
public sealed class HtmlFormElement : HtmlElement- Inheritance
HtmlElementHtmlFormElement
Properties
| Name | Description |
|---|---|
| AcceptCharset | Gets or sets the value of the accept-charset content attribute. |
| Action | Gets or sets the value of the action content attribute. |
| Autocomplete | Gets or sets the value of the autocomplete content attribute, limited to the known values (the canonical keyword, or the default value). |
| Elements | https://html.spec.whatwg.org/multipage/forms.html#dom-form-elements: the listed elements whose form owner is the form, except image buttons, in tree order. |
| Encoding | Gets or sets the value of the enctype content attribute, limited to the known values (the canonical keyword, or the default value). |
| Enctype | Gets or sets the value of the enctype content attribute, limited to the known values (the canonical keyword, or the default value). |
| Length | Gets the number of listed form controls of the form. |
| Method | Gets or sets the value of the method content attribute, limited to the known values (the canonical keyword, or the default value). |
| Name | Gets or sets the value of the name content attribute. |
| NoValidate | Gets or sets a value indicating whether the element has the novalidate content attribute. |
| Rel | Gets or sets the value of the rel content attribute. |
| RelList | Gets the tokens of the rel content attribute. |
| Target | Gets or sets the value of the target content attribute. |
AcceptCharset
HtmlElements.g.csGets or sets the value of the accept-charset content attribute.
public string AcceptCharset { get; set; }Property value
See also
Action
HtmlElements.g.csGets or sets the value of the action content attribute.
public string Action { get; set; }Autocomplete
HtmlElements.g.csGets or sets the value of the autocomplete content attribute, limited to the known values (the canonical keyword, or the default value).
public string Autocomplete { get; set; }Elements
HtmlFormElement.cshttps://html.spec.whatwg.org/multipage/forms.html#dom-form-elements: the listed elements whose form owner is the form, except image buttons, in tree order.
public HtmlFormControlsCollection Elements { get; }Encoding
HtmlElements.g.csGets or sets the value of the enctype content attribute, limited to the known values (the canonical keyword, or the default value).
public string Encoding { get; set; }Enctype
HtmlElements.g.csGets or sets the value of the enctype content attribute, limited to the known values (the canonical keyword, or the default value).
public string Enctype { get; set; }Length
HtmlFormElement.csGets the number of listed form controls of the form.
public uint Length { get; }Method
HtmlElements.g.csGets or sets the value of the method content attribute, limited to the known values (the canonical keyword, or the default value).
public string Method { get; set; }Gets or sets the value of the name content attribute.
public string Name { get; set; }NoValidate
HtmlElements.g.csGets or sets a value indicating whether the element has the novalidate content attribute.
public bool NoValidate { get; set; }Gets or sets the value of the rel content attribute.
public string Rel { get; set; }RelList
HtmlElements.g.csGets the tokens of the rel content attribute.
public DomTokenList RelList { get; }Property value
See also
Target
HtmlElements.g.csGets or sets the value of the target content attribute.
public string Target { get; set; }Indexers
| Name | Description |
|---|---|
| this[string] | The named getter (https://html.spec.whatwg.org/multipage/forms.html#dom-form-nameditem). |
| this[uint] | Gets the listed form control at the given index, or null when the index is out of range. |
Item overloads
this[string]
HtmlFormElement.csThe named getter (https://html.spec.whatwg.org/multipage/forms.html#dom-form-nameditem).
public RadioNodeListOrElement? this[string name] { get; }this[uint]
HtmlFormElement.csGets the listed form control at the given index, or null when the index is out of range.
Methods
| Name | Description |
|---|---|
| CheckValidity() | https://html.spec.whatwg.org/multipage/forms.html#dom-form-checkvalidity |
| ReportValidity() | Checks the validity of the form controls, fires an invalid event on each invalid control and returns whether all of them are valid. |
| RequestSubmit(HtmlElement?) | https://html.spec.whatwg.org/multipage/forms.html#dom-form-requestsubmit |
| Reset() | https://html.spec.whatwg.org/multipage/forms.html#dom-form-reset |
| Submit() | https://html.spec.whatwg.org/multipage/forms.html#dom-form-submit |
CheckValidity()
HtmlFormElement.cshttps://html.spec.whatwg.org/multipage/forms.html#dom-form-checkvalidity
public bool CheckValidity()ReportValidity()
HtmlFormElement.csChecks the validity of the form controls, fires an invalid event on each invalid control and returns whether all of them are valid.
public bool ReportValidity()RequestSubmit(HtmlElement?)
HtmlFormElement.cshttps://html.spec.whatwg.org/multipage/forms.html#dom-form-requestsubmit
public void RequestSubmit(HtmlElement? submitter = null)Reset()
HtmlFormElement.cshttps://html.spec.whatwg.org/multipage/forms.html#dom-form-reset
public void Reset()Submit()
HtmlFormElement.cshttps://html.spec.whatwg.org/multipage/forms.html#dom-form-submit
public void Submit()