facet classafFormBean::HtmlInput

sys::Obj
  afFormBean::HtmlInput : sys::Facet

@Serializable

Place on the field of a Fantom object / form bean if it should be rendered as HTML <input> tag.

attributes

Source

const Str? attributes

Any other miscellaneous attributes that should be rendered on the <input>. Example:

attributes = "autocomplete='off'"
blankLabel

Source

const Str? blankLabel

Used by the <select> renderer. This is the label to display in the blank option.

leave as null to use OptionsProvider.blankLabel value.

css

Source

const Str? css

The value to render as a CSS class attribute on the <input>.

hint

Source

const Str? hint

If non-null an extra <div> is rendered after the <input> to supply a helpful hint. The hint is usually rendered with the formBean-hint CSS class.

If null then the key field.${fieldName}.hint is used to look for a message.

inputSkin

Source

const Type? inputSkin

The InputSkin (type) used to render the field to HTML. InputSkins are autobuilt and cached by IoC.

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

label

Source

const Str? label

The label to display next to the <input>.

If null then the key field.${fieldName}.label is used to look for a message.

max

Source

const Int? max

HTML5 validation. Sets the maximum value (inclusive) an Int should have.

maxLength

Source

const Int? maxLength

HTML5 validation. Sets the maximum length (inclusive) a string should be.

min

Source

const Int? min

HTML5 validation. Sets the minimum value (inclusive) an Int should have.

minLength

Source

const Int? minLength

HTML5 validation. Sets the minimum length (inclusive) a string should be.

optionsProvider

Source

const Type? optionsProvider

Used by the <select> renderer. The OptionsProvider to use to provide, um, options! OptionsProvider are autobuilt and cached by IoC.

leave as null to use a default.

pattern

Source

const Str? pattern

HTML5 validation. Sets a regular expression that the (stringified) value should match. Starting ^ and ending $ characters are implicit and not required.

Maps to the HTML5 pattern attribute.

Expressed as a Str because Regex's are not serialisable in Fantom 1.0.66.

placeholder

Source

const Str? placeholder

The value to render as a placeholder attribute on the <input>.

If null then the key field.${fieldName}.placeholder is used to look for a message.

required

Source

const Bool required

HTML5 validation. Set to true to mark the input as required.

showBlank

Source

const Bool? showBlank

Used by the <select> renderer. Set to true to show a blank value at the start of the options list.

leave as null to use OptionsProvider.showBlank value.

step

Source

const Int? step

HTML5 validation.

type

Source

const Str type := "text"

The type of input to render. This value is used to select the skin used to render the input.

valueEncoder

Source

const Type? valueEncoder

The ValueEncoder (type) used to convert the field value to and from a Str. ValueEncoders are autobuilt and cached by IoC.

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