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'"
If
nullthen the msg key<bean>.<field>.attributesis used to look for a value.- blankLabel
const Str? blankLabelUsed by the
<select>renderer. This is the label to display in the blank option.If
nullthen the msg key<bean>.<field>.blankLabelis used to look for a value.leave as null to use
OptionsProvider.blankLabelvalue.- css
const Str? cssThe value to render as a CSS
classattribute on the<input>.If
nullthen the msg key<bean>.<field>.cssis used to look for a value.- 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 msg key<bean>.<field>.hintis used to look for a value.- inputSkin
const Type? inputSkinThe
InputSkin(type) used to render the field to HTML.InputSkinsare autobuilt and cached by IoC.If
nullthen the msg key<bean>.<field>.inputSkinis used to look for a value. Defaults a lookup using@HtmlInput.typeif not found.- label
const Str? labelThe label to display next to the
<input>.If
nullthen the msg key<bean>.<field>.labelis used to look for a value. Defaults to a human readable version of the field name if not found.- max
const Int? maxHTML5 validation. Sets the maximum value (inclusive) an
Intshould have.If
nullthen the msg key<bean>.<field>.maxis used to look for a value.- maxLength
const Int? maxLengthHTML5 validation. Sets the maximum length (inclusive) a string should be.
If
nullthen the msg key<bean>.<field>.maxLengthis used to look for a value.- min
const Int? minHTML5 validation. Sets the minimum value (inclusive) an
Intshould have.If
nullthen the msg key<bean>.<field>.minis used to look for a value.- minLength
const Int? minLengthHTML5 validation. Sets the minimum length (inclusive) a string should be.
If
nullthen the msg key<bean>.<field>.minLengthis used to look for a value.- optionsProvider
const Type? optionsProviderUsed by the
<select>renderer. TheOptionsProviderto use to provide, um, options!OptionsProviderinstances are autobuilt and cached by IoC.If
nullthen the msg key<bean>.<field>.optionsProvideris used to look for a value.leave as null to use a default.
- pattern
const Regex? patternHTML5 validation. Sets a regular expression that the (stringified) value should match. Starting
^and ending$characters are implicit and not required.If
nullthen the msg key<bean>.<field>.patternis used to look for a value.- placeholder
const Str? placeholderThe value to render as a
placeholderattribute on the<input>.If
nullthen the msg key<bean>.<field>.placeholderis used to look for a value.- required
const Bool? requiredHTML5 validation. Set to
trueto mark the input as required.If
nullthen the msg key<bean>.<field>.requiredis used to look for a value. If still not found then the input is deemed required if the field is non-nullable.- showBlank
const Bool? showBlankUsed by the
<select>renderer. Set totrueto show a blank value at the start of the options list.If
nullthen the msg key<bean>.<field>.showBlankis used to look for a value.leave as null to use
OptionsProvider.showBlankvalue.- step
const Int? stepHTML5 validation. Defines number intervals for a numeric input.
If
nullthen the msg key<bean>.<field>.stepis used to look for a value.- type
const Str? typeThe type of input to render. This value is used to select the skin used to render the input.
If
nullthen the msg key<bean>.<field>.typeis used to look for a value. Defaults totextif not found.- valueEncoder
const Type? valueEncoderThe
ValueEncoder(type) used to convert the field value to and from aStr.ValueEncodersare autobuilt and cached by IoC.If
nullthen the msg key<bean>.<field>.valueEncoderis used to look for a value. Defaults to using BedSheet'sValueEncodersservice if not found.- viewOnly
const Bool? viewOnlyIf
truethen the field is rendered into the HTML form as normal, but no attempt is made to validate the form value or decode it to a Fantom value.Useful for rendering static, read only, HTML associated with the field.
If
nullthen the msg key<bean>.<field>.viewOnlyis used to look for a value.