Class
FormValues
ConsoleMonster.Interactive
The values of a form by field name: typed access (FormValues.Get), multi-selections as lists, and only the fields that are visible in FormValues.Visible.
Inheritance
- object
- FormValues
Usage
Explore 54 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 21
- Property ChoiceField.LoadChoices
- Property ChoiceField.Validator
- Property ChoiceField.VisibleWhen
- Property Field.Validator
- Property Field.VisibleWhen
- Method Form.GetValues
- Property FormResult.Values
- Property MenuContext.Values
- Property NumberField.Validator
- Property NumberField.VisibleWhen
- Property PathField.Validator
- Property PathField.VisibleWhen
- Property RunContext.Values
- Property SecretField.Validator
- Property SecretField.VisibleWhen
- Property TextAreaField.Validator
- Property TextAreaField.VisibleWhen
- Property TextField.Validator
- Property TextField.VisibleWhen
- Property ToggleField.Validator
- Property ToggleField.VisibleWhen
Accepted by parameters 33
- Extension method ChoiceField.ChoicesBy
- Extension method ChoiceField.ShowWhen
- Extension method ChoiceField.Validate
- Method ChoiceFieldFluent.ChoicesBy
- Method ChoiceFieldFluent.ShowWhen
- Method ChoiceFieldFluent.Validate
- Method FieldFluent.ShowWhen``1
- Method FieldFluent.Validate``1
- Method Form.Apply
- Extension method NumberField.ShowWhen
- Extension method NumberField.Validate
- Method NumberFieldFluent.ShowWhen
- Method NumberFieldFluent.Validate
- Extension method PathField.ShowWhen
- Extension method PathField.Validate
- Method PathFieldFluent.ShowWhen
- Method PathFieldFluent.Validate
- Extension method SecretField.ShowWhen
- Extension method SecretField.Validate
- Method SecretFieldFluent.ShowWhen
- Method SecretFieldFluent.Validate
- Extension method TextAreaField.ShowWhen
- Extension method TextAreaField.Validate
- Method TextAreaFieldFluent.ShowWhen
- Method TextAreaFieldFluent.Validate
- Extension method TextField.ShowWhen
- Extension method TextField.Validate
- Method TextFieldFluent.ShowWhen
- Method TextFieldFluent.Validate
- Extension method ToggleField.ShowWhen
- Extension method ToggleField.Validate
- Method ToggleFieldFluent.ShowWhen
- Method ToggleFieldFluent.Validate
Constructors
public FormValues() #Methods
public bool Contains(string name) #Whether a field exists.
Parameters
- name string
- The field name.
Returns
bool True when it exists.public IEnumerator<KeyValuePair<string, object?>> GetEnumerator() #Returns an enumerator that iterates through the collection.
Returns
IEnumerator<KeyValuePair<string, object?>> An enumerator that can be used to iterate through the collection.public IReadOnlyList<TItem?> GetList<TItem>(string name) #A multi-selection (or a single value) as a typed list.
Type Parameters
- TItem
- The item type.
Parameters
- name string
- The field name.
Returns
IReadOnlyList<TItem?> The items that have the type.public T? Get<T>(string name, T? fallback = null) #The value converted to T (lists for multi-selections), or the default.
Type Parameters
- T
- The type.
Parameters
- name string
- The field name.
- fallback T? = null
- Returned when the field is empty.
Returns
T? The value.public bool IsVisible(string name) #Whether a field is currently shown (its condition holds).
Parameters
- name string
- The field name.
Returns
bool True when visible.public Dictionary<string, object?> ToDictionary() #A plain dictionary of the visible values.
Returns
Dictionary<string, object?> The dictionary.