FormField - AppDaddy-Software-Solutions-Inc/framework-markup-language GitHub Wiki

FormField : ViewableWidget

The base class from which all widgets that can be used to collect data inside or outside of a form are derrived.

Attributes

Name Type Default Description
value string The field's value.
default string The default value when null or empty
visible bool true Widget is visible or hidden.
Note: Hidden fields are not posted unless post=true
editable bool true If the field is editable. Allows for highlighting of text and focus of the field.
enabled bool true If the field is editable and has styling to denote disabled, as well as blocks focus.
meta-<name> string Where -<name> is optional. A bindable property is created for each unique meta tag. The tag is addressable using its name <id>.<name>. If no -<name> extension is specified, the name defaults to meta. So for example, if meta="123" is used, a bindable property <id>.meta is created with a value=123. If multiple tags are specified, such as <... meta-tag1="hello" meta-tag2="world" />, bindable properties are created for each. In this example, <id>.tag1 and <id>.tag2. <id> is the id of the encapsulating form field. When saving a <FORM/>, each meta tag is serialized as as an attribute of the element. In this example, the attributes tag1="hello" and tag2="world" are appended to the serialized field. Meta tag names are ignored if the name collides with another attributes name

Attributes (if part of a parent FORM)

Name Type Default Description Req
post bool true Normally, visible form fields that are part of a <FORM/>(./Form) are included in the default posting body of the form when the form is submitted. When post is true, the field will always be included regardless of its visibility. When post is false, the field will ignored when the postiong body ios constructed.
mandatory bool false Pops an alarm if the field is blank when complete() is called when in a form.
alarm string Holds the id of the <ALARM/>(./Alarm) (if defined) in the alarming state
alarming bool false If the field has an <ALARM/>(./Alarm) in the alarming state.
error bool false Set to true to display error border and text.
errortext string The error text displayed below the widget when error is true.

Properties

Name Values Description
dirty bool Field has been changed
touched bool Field has been changed manually

Events

Name Description
onchange The EVENT string to be executed when the widgets value is changed.

Other Links You May Find Useful:

⚠️ **GitHub.com Fallback** ⚠️