<input>

Used to accept a single line of text. As with all XMod tags, the <input> tag has a required

child tag: <label> and several optional child tags.

 

ATTRIBUTES <input>:

ref

Name of the field whose value you wish to insert (Required) [String value]

Names must begin with a letter and may only include letters, numbers and the underscore character.

class

Name of the CSS Class used to style the text box (Optional) [String value]

width

Specifies the width, of the border. Values can be specified in various measurements:

Pixel (px) "1px"

Point (pt) "1pt"

Centimeter (cm) "1cm"

Millimeter (mm) "1mm"

Inch (in) "1in"

Em (em) "1em"

maxlength

The maximum number of characters a user should be allowed (Optional) [Numeric value]

required

If true, the user will be required to enter a value (Optional) [true or false]

style

Same as the HTML style attribute.It allows you to apply CSS styling to the element (e.g. "color: red; border: solid 1px black;")  (Optional). [String value]

readonly

If true, the contents of the control cannot be changed. If false (the default), the contents can be changed. (Optional)
(new to version 3.2)

password

If true, the resulting text box will obfuscate the characters entered into the text box as is commonly seen when entering passwords for a user login, for instance. Note: if password is true, a default text cannot be specified. (new to version 2.0)

errormessage

If the field is required but has not been filled out by the user, XMod will display the contents of this attribute. If this attribute isn't specified, XMod will default to "FieldName Is Required" (Optional) (new to version 3.0)

ADDITIONAL ATTRIBUTES (New to Version 4.0)

accesskey

In browsers that support it, this property can be set to a character on the keyboard that can be used to set focus to the control. For instance, setting the value to F allows the user to access the control by pressing Alt+F on their keyboard (for Windows machines)

backcolor

Color of the background of the control.

bordercolor

Color of the border around the control

borderstyle

Style of the border around the control.

borderwidth

Width of the border around the control specified in units

enabled

Whether the control accepts input. May not work in older browsers. Valid values are true and false. The default value is true.

Font Properties

A series of attributes such as font-bold, font-size, etc. that allow you to control how the text in the control is displayed. Click the link for more for the list of properties and their description.

forecolor

Color of the text within the control.

height

The height of the control, specified in units

tabindex

The tab order of the control.

tooltip

In those browsers that support it, this attribute specifies the text displayed in the tooltip when the mouse is over the control.

onfocus

Javascript specified here will be executed when the input control receives focus.

onblur

Javascript specified here will be executed when the input control loses focus.

onchange

Javascript specified here will be executed when the contents of the input control have changed

Client_Side Events

Javascript can be attached to certain events raised by this control. Click the link for more information.

CHILD TAGS

label

The caption used to identify the control

default

The value specified in this tag will be placed into the control when the form is first loaded. This allows a form builder to pre-fill certain fields in a form to improve the user experience or give hints as to the type of data expected. (new to version 1.2)

validate

Tells XMod to perform validation on the control. See <validate> attributes for more info.

info

This child tag can be used for most anything but is typically used to display more information (usually in a help-related context) about the data entry item.

calendar

When used, displays a link to pop-up a calendar to ease date selection.
(new to version 3.0)

ATTRIBUTES <validate>:

See <validate> tag topic

ATTRIBUTES <info>:

See <info> tag topic

EXAMPLE

<input ref="txtQuantity" class="NormalTextBox" required="true" width="50px" errormessage="You must enter a value for Quantity">

  <label>Quantity</label>

  <default>1</default>

  <validate type="numeric" message="You must enter a number for Quantity" class="NormalRed"/>

  <info caption="More Info..." visibility="hidden" class="NormalBold" linkclass="Normal">Enter the number of items you wish to purchase</info>

</input>

 

<input ref="txtPassword" class="NormalTextBox" required="true" width="50px" password="true">

  <label>Password</label>

</input>