facet classafFormBean::HtmlInput
sys::Obj afFormBean::HtmlInput : sys::Facet
Place on the field of a Fantom object / form bean if it should be rendered as HTML <input> tag.
- attributes
const Str? attributesAny other miscellaneous attributes that should be rendered on the
<input>. Example:attributes = "autocomplete='off'"
- blankLabel
const Str? blankLabelUsed by the
<select>renderer. This is the label to display in the blank option.leave as null to use
OptionsProvider.blankLabelvalue.- css
const Str? cssThe value to render as a CSS
classattribute on the<input>.- hint
const Str? hintIf non-null an extra
<div>is rendered after the<input>to supply a helpful hint. The hint is usually rendered with theformBean-hintCSS class.If
nullthen the keyfield.${fieldName}.hintis used to look for a message.- inputSkin
const Type? inputSkinThe
InputSkin(type) used to render the field to HTML.InputSkinsare autobuilt and cached by IoC.If
nullthen a defaultInputSkinis chosen based on the@HtmlInput.typeattribute.- label
const Str? labelThe label to display next to the
<input>.If
nullthen the keyfield.${fieldName}.labelis used to look for a message.- max
const Int? maxHTML5 validation. Sets the maximum value (inclusive) an
Intshould have.- maxLength
const Int? maxLengthHTML5 validation. Sets the maximum length (inclusive) a string should be.
- min
const Int? minHTML5 validation. Sets the minimum value (inclusive) an
Intshould have.- minLength
const Int? minLengthHTML5 validation. Sets the minimum length (inclusive) a string should be.
- optionsProvider
const Type? optionsProviderUsed by the
<select>renderer. TheOptionsProviderto use to provide, um, options!OptionsProviderare autobuilt and cached by IoC.leave as null to use a default.
- pattern
const Str? patternHTML5 validation. Sets a regular expression that the (stringified) value should match. Starting
^and ending$characters are implicit and not required.Maps to the HTML5
patternattribute.Expressed as a Str because Regex's are not serialisable in Fantom 1.0.66.
- placeholder
const Str? placeholderThe value to render as a
placeholderattribute on the<input>.If
nullthen the keyfield.${fieldName}.placeholderis used to look for a message.- required
const Bool requiredHTML5 validation. Set to
trueto mark the input as required.- showBlank
const Bool? showBlankUsed by the
<select>renderer. Set totrueto show a blank value at the start of the options list.leave as null to use
OptionsProvider.showBlankvalue.- step
const Int? stepHTML5 validation.
- type
const Str type := "text"The type of input to render. This value is used to select the skin used to render the input.
- valueEncoder
const Type? valueEncoderThe
ValueEncoder(type) used to convert the field value to and from aStr.ValueEncodersare autobuilt and cached by IoC.If
nullthen a defaultValueEncoderbased on the field type is chosen from BedSheet'sValueEncodersservice.