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

Source

Str? errMsg

Setting this to a non-null value also invalidates the form field.

field

Source

Field field

The Fantom field this FormField represents.

formValue

Source

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 is null then the field value is used instead and converted by valueEncoder.

This formValue is also set during form validation so any user entered values are re-rendered should the form be re-displayed.

input

Source

HtmlInput input()

Returns the @HtmlInput from the Fantom field.

inputSkin

Source

InputSkin? inputSkin

The InputSkin used to render the field to HTML.

If null then a default InputSkin is chosen based on the @HtmlInput.type attribute.

invalid

Source

Bool invalid

Is this form field invalid?

Setting this to false also clears any error message.

optionsProvider

Source

OptionsProvider? optionsProvider

The OptionsProvider used to supply option values when rendering <select> tags.

If null then a default OptionsProvider is chosen based on the field type.

valueEncoder

Source

ValueEncoder? valueEncoder

The ValueEncoder used to convert the field value to and from a Str.

If null then a default ValueEncoder based on the field type is chosen from BedSheet's ValueEncoders service.