Fable.Modulo


FormInputModel Module

Functions related to the FormInputModel type

Functions and values

Function or value Description

boolField initialValue updater

Full Usage: boolField initialValue updater

Parameters:
Returns: FormInputModel<'a, bool>

Construct a FormInputModel backed by a boolean value

initialValue : Result<bool, string>
updater : FormInputModel<'a, bool> -> 'a -> 'a
Returns: FormInputModel<'a, bool>

boolOptionField initialValue updater

Full Usage: boolOptionField initialValue updater

Parameters:
Returns: FormInputModel<'a, bool option>

Construct a FormInputModel backed by a boolean optional value

initialValue : Result<bool option, string>
updater : FormInputModel<'a, bool option> -> 'a -> 'a
Returns: FormInputModel<'a, bool option>

create text value parser formatter updater

Full Usage: create text value parser formatter updater

Parameters:
    text : string
    value : Result<'t, string>
    parser : string -> Result<'t, string>
    formatter : 't -> string
    updater : FormInputModel<'f, 't> -> 'f -> 'f

Returns: FormInputModel<'f, 't>
Modifiers: inline
Type parameters: 'f, 't

Create a FormInputModel object

text : string
value : Result<'t, string>
parser : string -> Result<'t, string>
formatter : 't -> string
updater : FormInputModel<'f, 't> -> 'f -> 'f
Returns: FormInputModel<'f, 't>

create' value parser formatter updater

Full Usage: create' value parser formatter updater

Parameters:
    value : Result<'t, string>
    parser : string -> Result<'t, string>
    formatter : 't -> string
    updater : FormInputModel<'f, 't> -> 'f -> 'f

Returns: FormInputModel<'f, 't>
Modifiers: inline
Type parameters: 'f, 't

Create a FormInputModel object with the initial text generated by the "formatter" function

value : Result<'t, string>
parser : string -> Result<'t, string>
formatter : 't -> string
updater : FormInputModel<'f, 't> -> 'f -> 'f
Returns: FormInputModel<'f, 't>

dateField initialValue updater

Full Usage: dateField initialValue updater

Parameters:
Returns: FormInputModel<'f, DateTime>

Construct a FormInputModel backed by the Date part of a System.DateTime value

initialValue : Result<DateTime, string>
updater : FormInputModel<'f, DateTime> -> 'f -> 'f
Returns: FormInputModel<'f, DateTime>

dateOptionField initialValue updater

Full Usage: dateOptionField initialValue updater

Parameters:
Returns: FormInputModel<'a, DateTime option>

Construct a FormInputModel backed by the Date part of a System.DateTime option value

initialValue : Result<DateTime option, string>
updater : FormInputModel<'a, DateTime option> -> 'a -> 'a
Returns: FormInputModel<'a, DateTime option>

dateTimeField initialValue updater

Full Usage: dateTimeField initialValue updater

Parameters:
Returns: FormInputModel<'a, DateTimeOffset>

Construct a FormInputModel backed by a System.DateTimeOffset value

initialValue : Result<DateTimeOffset, string>
updater : FormInputModel<'a, DateTimeOffset> -> 'a -> 'a
Returns: FormInputModel<'a, DateTimeOffset>

dateTimeOptionField initialValue updater

Full Usage: dateTimeOptionField initialValue updater

Parameters:
Returns: FormInputModel<'a, DateTimeOffset option>

Construct a FormInputModel backed by a System.DateTimeOffset optional value

initialValue : Result<DateTimeOffset option, string>
updater : FormInputModel<'a, DateTimeOffset option> -> 'a -> 'a
Returns: FormInputModel<'a, DateTimeOffset option>

decimalField initialValue updater

Full Usage: decimalField initialValue updater

Parameters:
Returns: FormInputModel<'a, decimal>

Construct a FormInputModel backed by a System.Decimal value

initialValue : Result<decimal, string>
updater : FormInputModel<'a, decimal> -> 'a -> 'a
Returns: FormInputModel<'a, decimal>

decimalOptionField initialValue updater

Full Usage: decimalOptionField initialValue updater

Parameters:
    initialValue : Result<decimal option, string>
    updater : FormInputModel<'a, decimal option> -> 'a -> 'a

Returns: FormInputModel<'a, decimal option>

Construct a FormInputModel backed by an optional System.Double value

initialValue : Result<decimal option, string>
updater : FormInputModel<'a, decimal option> -> 'a -> 'a
Returns: FormInputModel<'a, decimal option>

floatField initialValue updater

Full Usage: floatField initialValue updater

Parameters:
Returns: FormInputModel<'a, float>

Construct a FormInputModel backed by a System.Double value

initialValue : Result<float, string>
updater : FormInputModel<'a, float> -> 'a -> 'a
Returns: FormInputModel<'a, float>

floatOptionField initialValue updater

Full Usage: floatOptionField initialValue updater

Parameters:
    initialValue : Result<float option, string>
    updater : FormInputModel<'a, float option> -> 'a -> 'a

Returns: FormInputModel<'a, float option>

Construct a FormInputModel backed by an optional System.Double value

initialValue : Result<float option, string>
updater : FormInputModel<'a, float option> -> 'a -> 'a
Returns: FormInputModel<'a, float option>

intField initialValue updater

Full Usage: intField initialValue updater

Parameters:
Returns: FormInputModel<'a, int>

Construct a FormInputModel backed by a System.Int32 value

initialValue : Result<int, string>
updater : FormInputModel<'a, int> -> 'a -> 'a
Returns: FormInputModel<'a, int>

intOptionField initialValue updater

Full Usage: intOptionField initialValue updater

Parameters:
Returns: FormInputModel<'a, int option>

Construct a FormInputModel backed by an optional System.Int32 value

initialValue : Result<int option, string>
updater : FormInputModel<'a, int option> -> 'a -> 'a
Returns: FormInputModel<'a, int option>

stringField initialValue updater

Full Usage: stringField initialValue updater

Parameters:
Returns: FormInputModel<'a, string>

Construct a FormInputModel backed by a string

initialValue : Result<string, string>
updater : FormInputModel<'a, string> -> 'a -> 'a
Returns: FormInputModel<'a, string>
Example


 FormInputModel.stringField (Ok "") (fun item form -> {form with MyField = item})

stringOptionField initialValue updater

Full Usage: stringOptionField initialValue updater

Parameters:
    initialValue : Result<string option, string>
    updater : FormInputModel<'a, string option> -> 'a -> 'a

Returns: FormInputModel<'a, string option>

Construct a FormInputModel backed by an optional string

initialValue : Result<string option, string>
updater : FormInputModel<'a, string option> -> 'a -> 'a
Returns: FormInputModel<'a, string option>
Example


 FormInputModel.stringOptionField (Ok None) (fun item form -> {form with MyField = item})

timeSpanField initialValue updater

Full Usage: timeSpanField initialValue updater

Parameters:
Returns: FormInputModel<'a, TimeSpan>

Construct a FormInputModel backed by a System.TimeSpan value

initialValue : Result<TimeSpan, string>
updater : FormInputModel<'a, TimeSpan> -> 'a -> 'a
Returns: FormInputModel<'a, TimeSpan>

timeSpanOptionField initialValue updater

Full Usage: timeSpanOptionField initialValue updater

Parameters:
Returns: FormInputModel<'a, TimeSpan option>

Construct a FormInputModel backed by a System.TimeSpan optional value

initialValue : Result<TimeSpan option, string>
updater : FormInputModel<'a, TimeSpan option> -> 'a -> 'a
Returns: FormInputModel<'a, TimeSpan option>

updateForm form item text

Full Usage: updateForm form item text

Parameters:
Returns: 'f
Modifiers: inline
Type parameters: 'f, 't

Update the form by changing the text on the given field.

form : 'f
item : FormInputModel<'f, 't>
text : string
Returns: 'f

updateText text item

Full Usage: updateText text item

Parameters:
Returns: FormInputModel<'f, 't>
Modifiers: inline
Type parameters: 'f, 't

Update the field's value with the given text. The validation function is not called.

text : string
item : FormInputModel<'f, 't>
Returns: FormInputModel<'f, 't>

updateValue value item

Full Usage: updateValue value item

Parameters:
Returns: FormInputModel<'f, 't>
Modifiers: inline
Type parameters: 'f, 't

Update the field's value. The field's text is generated by the formatter. The validation function is not called.

value : Result<'t, string>
item : FormInputModel<'f, 't>
Returns: FormInputModel<'f, 't>

withDisabled x item

Full Usage: withDisabled x item

Parameters:
Returns: FormInputModel<'a, 'b>

Disable the field

x : bool
item : FormInputModel<'a, 'b>
Returns: FormInputModel<'a, 'b>

withFormatter formatter item

Full Usage: withFormatter formatter item

Parameters:
Returns: FormInputModel<'b, 'a>

Set the formatter

formatter : 'a -> string
item : FormInputModel<'b, 'a>
Returns: FormInputModel<'b, 'a>

withLabel label item

Full Usage: withLabel label item

Parameters:
Returns: FormInputModel<'a, 'b>

Set the label

label : string
item : FormInputModel<'a, 'b>
Returns: FormInputModel<'a, 'b>

withPlaceholder placeholder item

Full Usage: withPlaceholder placeholder item

Parameters:
Returns: FormInputModel<'a, 'b>

Set the placeholder

placeholder : string
item : FormInputModel<'a, 'b>
Returns: FormInputModel<'a, 'b>

withRelativeSize s item

Full Usage: withRelativeSize s item

Parameters:
Returns: FormInputModel<'a, 'b>

Set the relative size

s : int
item : FormInputModel<'a, 'b>
Returns: FormInputModel<'a, 'b>

withTooltip v item

Full Usage: withTooltip v item

Parameters:
Returns: FormInputModel<'a, 'b>

Set the tooltip text

v : TooltipKind
item : FormInputModel<'a, 'b>
Returns: FormInputModel<'a, 'b>

withTooltipText text item

Full Usage: withTooltipText text item

Parameters:
Returns: FormInputModel<'a, 'b>

Set the tooltip text

text : string
item : FormInputModel<'a, 'b>
Returns: FormInputModel<'a, 'b>

withValidator validator item

Full Usage: withValidator validator item

Parameters:
Returns: FormInputModel<'a, 'b>

Set the validator

validator : 'a -> 'b -> Result<'b, string>
item : FormInputModel<'a, 'b>
Returns: FormInputModel<'a, 'b>