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? errMsgSetting this to a non-null value also invalidates the form field.
- field
Field fieldThe Fantom field this
FormFieldrepresents.- formValue
Str? formValueThe
Strvalue 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
formValueisnullthen the field value is used instead and converted byvalueEncoder.This
formValueis also set during form validation so any user entered values are re-rendered should the form be re-displayed.- input
HtmlInput input()Returns the
@HtmlInputfrom the Fantom field.- inputSkin
InputSkin? inputSkinThe
InputSkinused to render the field to HTML.If
nullthen a defaultInputSkinis chosen based on the@HtmlInput.typeattribute.- invalid
Bool invalidIs this form field invalid?
Setting this to
falsealso clears any error message.- optionsProvider
OptionsProvider? optionsProviderThe
OptionsProviderused to supply option values when rendering<select>tags.If
nullthen a defaultOptionsProvideris chosen based on the field type.- valueEncoder
ValueEncoder? valueEncoderThe
ValueEncoderused to convert the field value to and from aStr.If
nullthen a defaultValueEncoderbased on the field type is chosen from BedSheet'sValueEncodersservice.