classafFormBean::FormField
sys::Obj afFormBean::FormField
Holds all the meta data required to convert a field on a Fantom object to HTML and back again.
- errMsg
Str? errMsg
Setting this to a non-null value also invalidates the form field.
- field
Field field
The Fantom field this
FormField
represents.- formValue
Str? formValue
The
Str
value that will be rendered in the HTML form. You may set this value before the form is rendered to set a default value.If the
formValue
isnull
then the field value is used instead and converted byvalueEncoder
.This
formValue
is also set during form validation so any user entered values are re-rendered should the form be re-displayed.- input
HtmlInput input()
Returns the
@HtmlInput
from the Fantom field.- inputSkin
InputSkin? inputSkin
The
InputSkin
used to render the field to HTML.If
null
then a defaultInputSkin
is chosen based on the@HtmlInput.type
attribute.- invalid
Bool invalid
Is this form field invalid?
Setting this to
false
also clears any error message.- optionsProvider
OptionsProvider? optionsProvider
The
OptionsProvider
used to supply option values when rendering<select>
tags.If
null
then a defaultOptionsProvider
is chosen based on the field type.- valueEncoder
ValueEncoder? valueEncoder
The
ValueEncoder
used to convert the field value to and from aStr
.If
null
then a defaultValueEncoder
based on the field type is chosen from BedSheet'sValueEncoders
service.