# HtmlFormControlState

Immutable live form properties, retained separately from authored attributes and text.

Class 

`OfficeIMO.Html.Dom`

**Namespace**

`OfficeIMO.Html.Dom`

**Assembly**

`OfficeIMO.Html.Core`

**Source revision**

`56dd0d38e0b5` with working tree changes

**Source**

[HtmlFormControlState.cs:21](https://github.com/EvotecIT/OfficeIMO/blob/56dd0d38e0b526611c1af001c026f8c72600880f/OfficeIMO.Html.Core/HtmlFormControlState.cs#L21)

**Modifiers**

sealed

Immutable live form properties, retained separately from authored attributes and text.

## Inheritance

- object
- HtmlFormControlState

## Remarks

Changing an attribute does not discard these properties. Set FormState to null to return an owned element to attribute-based form semantics. File contents and text selections are not represented by this state.

## Usage

Explore 1 API references to this type

This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.

### Returned or exposed by 1

- Property [HtmlElement.FormState](/api/html-core/officeimo-html-dom-htmlelement/#property-formstate)

Filter members 

Show inherited

## Constructors

`public HtmlFormControlState(HtmlFormControlStateKind kind, string? value = null, bool isChecked = false, bool isIndeterminate = false, bool isSelected = false)` [#](#constructor-ctor-officeimo-html-dom-htmlformcontrolstatekind-string-boolean-boolean-boolean)

[HtmlFormControlState.cs:21](https://github.com/EvotecIT/OfficeIMO/blob/56dd0d38e0b526611c1af001c026f8c72600880f/OfficeIMO.Html.Core/HtmlFormControlState.cs#L21)

Creates validated state for one form element.

Parameters

**kind OfficeIMO.Html.Dom.HtmlFormControlStateKind required**

**value string? = null optional**

**isChecked bool = false optional**

**isIndeterminate bool = false optional**

**isSelected bool = false optional**

## Inherited Methods

`public virtual bool Equals(object? obj)` [#](#method-equals-object)

Inherited from object

Parameters

**obj object? required**

Returns

`bool`

`public virtual int GetHashCode()` [#](#method-gethashcode)

Inherited from object

Returns

`int`

`public Type GetType()` [#](#method-gettype)

Inherited from object

Returns

`Type`

`public virtual string? ToString()` [#](#method-tostring)

Inherited from object

Returns

`string?`

## Properties

`public HtmlFormControlStateKind Kind { get; }` [#](#property-kind)

[HtmlFormControlState.cs:35](https://github.com/EvotecIT/OfficeIMO/blob/56dd0d38e0b526611c1af001c026f8c72600880f/OfficeIMO.Html.Core/HtmlFormControlState.cs#L35)

The applicable element kind.

`public string? Value { get; }` [#](#property-value)

[HtmlFormControlState.cs:37](https://github.com/EvotecIT/OfficeIMO/blob/56dd0d38e0b526611c1af001c026f8c72600880f/OfficeIMO.Html.Core/HtmlFormControlState.cs#L37)

Current input or textarea value; null for select and option state.

`public bool IsChecked { get; }` [#](#property-ischecked)

[HtmlFormControlState.cs:39](https://github.com/EvotecIT/OfficeIMO/blob/56dd0d38e0b526611c1af001c026f8c72600880f/OfficeIMO.Html.Core/HtmlFormControlState.cs#L39)

Current input checkedness, independent of its checked attribute.

`public bool IsIndeterminate { get; }` [#](#property-isindeterminate)

[HtmlFormControlState.cs:41](https://github.com/EvotecIT/OfficeIMO/blob/56dd0d38e0b526611c1af001c026f8c72600880f/OfficeIMO.Html.Core/HtmlFormControlState.cs#L41)

Current input indeterminate state.

`public bool IsSelected { get; }` [#](#property-isselected)

[HtmlFormControlState.cs:43](https://github.com/EvotecIT/OfficeIMO/blob/56dd0d38e0b526611c1af001c026f8c72600880f/OfficeIMO.Html.Core/HtmlFormControlState.cs#L43)

Current option selectedness, independent of its selected attribute.

<!-- PowerForge markdown artifact sha256:F4052323843298E96C5C744EF92096A954DDA56284FED879676EE1142A1AC91E -->
