API Reference
Field
A form field: a name (the key in FormValues), a label, help, a default, validation, a condition for showing it, the fields it depends on, and the command-line parameter it maps to for the equivalent command.
Inheritance
- Object
- Field
Usage
Explore 3 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 3
- Method Form.Find
- Property Form.Fields
- Property FormPage.Fields
Methods
public virtual String Display(Object? value, PromptLabels labels) #StringThe value as shown in the form and on the review page.
Parameters
- value System.Object?
- The value.
- labels ConsoleMonster.Interactive.PromptLabels
- The labels.
Returns
The text.
public override String ToString() #StringReturns a string that represents the current object.
Returns
A string that represents the current object.
Inherited Methods
Properties
public String? Parameter { get; set; } #The command-line parameter this field supplies (Domain, -Domain, --domain); null leaves the field out of the equivalent command.
public Object? Default { get; set; } #The declared default: the starting value until a value is set, and values equal to it are left out of the equivalent command.
public Func<FormValues, Boolean>? VisibleWhen { get; set; } #Shows the field only while this returns true.
public IList<String> DependsOn { get; } #Fields whose change resets this field (and reloads its options).
public Func<Object?, FormValues, String?>? Validator { get; set; } #A validator: returns an error message, or null when the value is fine.
public Boolean Remember { get; set; } #Whether the value is kept in presets and remembered choices (never for secrets).
public abstract FieldKind Kind { get; } #The kind.