Home > WebEOC > Admin Guide > HTML Conventions > Input Tags

Input Tags

The following tags are intended for use on input views of a board. They can be used to create buttons, links, and more. Three tags in-particular are restricted to input views:

By default, the <input> and <select> tags are represented in the SQL Server® database with a variable character field (nvarchar) limit of 500 characters. Text fields that hold an unlimited amount of data are <textarea> fields.

The underlying database field types can be overridden by the fieldtype attribute. In addition, field length for nvarchar fields can be overridden using the fieldlength attribute. If fieldtype is set to datetime, then the format attribute can be used to format the output of the field.

You may wish to review the allowed values and requirements so as to better understand the tags listed and how to properly implement them on your boards.

Tags

<cancelbutton>

The <cancelbutton> tag allows you to move the default Cancel button at the top of an input view to anywhere within an input view. In fact, you can use this tag multiple times so the button additionally appears at the top, at the bottom, or anywhere else on the page. This button requires use of the <savebutton> tag–if this tag is not used in the input view, the Cancel button will not work.

Attribute

Allowed Values

Requirements

Description

*

*

Optional

Passes any HTML attribute–except type, name, and value–through to the rendered tag.

<datalink>

Suppresses the data links section and displays a check box for the specific data link; rendered as <input type="checkbox" />.

Attribute

Allowed Values

Requirements

Description

name

%datalinkname

Required

Name of the datalink.

*

*

Optional

Passes any HTML attribute through to the rendered tag.

Tips

  • If using a <datalink> tag, you must specify one for each data link defined as the traditional data links section will be suppressed.

  • Label the data link; without a label, the tag only outputs the check box itself.

  • The target fields should be the same type of field.

Example

<td>Send this to the Regional Coordinator<datalink name="To Regional"/></td>

<enablerecordlocking>

The <enablerecordlocking> tag can be placed anywhere in the HTML for an input view to enable record locking for the designated input.

With record locking enabled, if two or more users open a record for editing and one user saves the record, the second user receives a warning message when attempting to save the record. The warning gives the user the opportunity to cancel, which in turn forces the user to update the newer record.

Note: This tag does not work with subscription boards.

<importbutton>

Displays a button in the input view that allows users to import data from a spreadsheet to the board.

Attribute

Allowed Values

Requirements

Description

admin

(false|true)

Optional

When set to true, authorized users are allowed to use certain import features. Clicking the button opens the administrator interface for the import function.

Example

<importbutton admin="true" />

Note: You can use this tag if you are a WebEOC Enterprise 7.7+ user or use WebEOC Professional 7.7+ and have a license for the Data Manager add-on.

<incidentselector>

Allows the selection of a different incident for the board entry. This tag does not show on incident-independent or form views and is disabled for existing board entries when part of a regional incident is a subscription board. Available only to administrators and/or Administrator profiles, <incidentselector> suppresses the Master View drop-down list in boards and is rendered as <select id="incidentselector" name="incidentselector">.

<input>

Extension of the standard HTML <input>; extended attributes are available when type="text".

The <input> tag is used to create data entry elements. An input field varies depending on the type of attribute you assign to it. An input field can be a text field, a check box, a radio button, a button, and more.

Attribute

Allowed Values

Requirements

Description

fieldlength

(NUMBER)500

Optional

Sets the table field length and sets the max length attribute of the same value.

fieldtype

(MOST VALID SQL DATA TYPES)

Optional

Allows assigning a data type for the underlying SQL column.

format

 

Optional

Allows assigning a date format for date data types.

label

CDATA

Optional

Text of the label or legend for this value.

required

(false|true)

Optional

Adds client-side checking that requires a value be set.

table

(parent table name)

Optional

Must be the parent table of the current record; only works with <type>.

validate

(datetime|date|time|integer|decimal)

Optional

Client-side type validation.

value

(_currentdate|_currentdatetime|_currenttime|_number|_positionname|_sessionname|_username|CDATA)CDATA

Optional

Allows assigning a data type, handling, or default value.

You can use the following values for the <type> attribute:

  • text – Creates a text field (<input type="text" />).

  • checkbox – Creates a check box (<input type="checkbox" />).

  • radio – Creates a radio button (<input type="radio" />).

  • hidden – Hides the input field (<input type="hidden" />).

You have the option to update a parent record from the child input record. To do this, include the table attribute in the <input> tag. Specify the parent table as the attribute's value. This use of the table attribute works only within an input field where the type="text".

Text input fields can have the predefined values listed in the table above. These predefined values in particular cause the field type to be datetime:

  • _currentdate – Causes the field to be the current date. The format is 101 (mm/dd/yyyy).

  • _currenttime – Causes the field be the current time. The format is 108 (hh:mm:ss).

  • _currentdatetime – Causes the field to be both the current date and time. The format is 100 (mm/dd/yyyy hh:mm:ss).

  • _number – Causes the field to be 0 and the field type to be int (integer). The format is 0 (int).

For example, the code <input type="text" value="_currentdate" /> causes the field type to be the current date.

The code below specifies you want a text field, of which you want named Location. The code below also includes the label attribute, allowing you to specify that a label should appear in all generated reports from the WebEOC Reporter.

<input type="text" name="location" label="Location" />

Note: When the label is defined, field names no longer display in reports they are only used if labels are not defined.

<savebutton>

The <savebutton> tag allows you to move the default Save button at the top of an input view to anywhere within an input view. In fact, you can use this tag multiple times so the button additionally appears at the top, at the bottom, or anywhere else on the page.

Attribute

Allowed Values

Requirements

Description

view

%viewname

Optional

Navigates to this view upon saving.

*

*

Optional

Passes any HTML attribute–except type and onclick–through to the rendered tag.

To change the value of the text within this button, use the <value> attribute. For example:

<savebutton value="Save Record"/>

You can also designate a view to go to after clicking the Save button.  For example, an input may be broken into a few pages so users only see five fields at a time instead of 100.

<savebutton view="Input View 2"></savebutton>

Note: Including the <savebutton> overwrites the default header section. Thus, the "New Entry" text and default buttons are removed from the input view

<select>

Creates a drop-down list. The <select> tag can be populated with lists contained in WebEOC. The lists are entered using the Lists Manager. To populate a <select> tag with a WebEOC list, use a list attribute on the <select> tag to set the name of the list.

To include text designed to guide users when selecting options from a list, use defaulttext. By using this attribute, if the user saves the entry with the default option selected, a value is not recorded for this field.

Note: The defaulttext attribute has no effect when used with <option> tags and, therefore, should only be used when a <select> tag is used in conjunction with the list attribute.

Attribute

Allowed Values

Requirements

Description

defaulttext

 

Optional

Default option for the value in the drop-down list.

name

table column name

Required

Make sure it is a valid identifier.

label

CDATA

Optional

Text of the label for the drop-down list.

list

WebEOC list name

Optional

Name of a WebEOC list.

parent

parent field name

Optional

Name of the parent field for a multi-tier list.

Examples 

When using hard-coded <select> lists with <option> tags, each <option> tag must contain a value attribute where the value matches the text between the opening and closing <option> tag. The following is a very basic example of this concept.

<select name="Match">
<option value="1">Not checked yet </option>
<option value="2">Not on List</option>
<option value="3">Further checks required</option>
<option value="4">On List</option>
</select>

For something a bit more advanced, you can use an existing WebEOC list for options in the drop-down by defining the list within the tag itself.

<select name="Match" list="Match List"/>

A list of all groups and positions for a process permission can be displayed by using two attributes. The processpermission attribute specifies the name of the process permission, and the processgroup attribute specifies whether the list should be populated with WebEOC groups or positions.

To see all groups for the requesting process permission:

<select name="FieldName" processpermission="Requesting" processgroup="groups">
</select>

To see all positions for the requesting process permission:

<select name="FieldName" processpermission="Requesting" processgroup="positions">
</select>

Tips

In WebEOC 7.4 and later, WebEOC administrators can define multiple levels of lists. Multi-tiered lists are configured using the Lists Manager and then utilized in boards by manually adding code to the board HTML through the Advanced Board Editor. 

The example code below can be used to set up multi-tiered lists in a board. In the example, State List is the name of the list. County List and City List are the sub-lists, both part of the parent list.

<select name="StateName" list="State List" />
<select name="CountyName" list="State List" parent="StateName" />
<select name="CityName" list="State List" parent="CountyName" />

<textarea> 

Defines a multi-line text input control. It can hold an unlimited number of characters, and the text renders in a fixed-width font. The size of a <textarea> tag can be specified by the cols (columns) and rows attributes.

<textarea name="FieldName" rows="6" cols="100"/>
</textarea>
You must to post a comment.
Last modified

Tags

Classifications

This page has no classifications.