Skip to main content

odsl-input-field

Description

The odsl-input-field component is an individual input items which you can use to input data on a data capture form. The odsl-input-field component must be a child component of type odsl-input-form component.

Attributes

name

The name attribute is the name of the field you want to save.

label

This is the label for the field to be shown to the user.

type

This the the type of field, the table below shows all possible types:

ValueDescription
textA string value
numberA numeric value
dateA date value (without time)
localdate-timeA datetime value
odsl-currencyA select list of currencies
odsl-calendarA select list of calendars
odsl-expiryA select list of expiry calendars
odsl-unitsA select list of units
odsl-timezoneA select list of timezones
odsl-event-listA select list of event list ids
odsl-sourceA select list of data sources

help

This is some help text shown below the field to give the user some information about what to enter into this field.

value

The is the default value of the field, can be omitted.

Methods

setValue(v)

The setValue method sets the value of this field to the passed in value.

Examples

An input form to add an event to an object

<odsl-input-form service="object" source="private" onsubmit="insertIntoObject(event.detail)">
<odsl-input-field name="name" class="col-6" type="text" label="Name" help="Enter the name"></odsl-input-field>
<odsl-input-field name="description" class="col-6" type="text" label="Description" help="Enter the description"></odsl-input-field>
<odsl-input-field name="currency" type="odsl-currency" label="Currency" help="Currency"></odsl-input-field>
<odsl-input-field name="units" type="odsl-units" label="Units" help="Units"></odsl-input-field>
<odsl-input-field name="calendar" class="col-5" type="odsl-calendar" label="Calendar" help="The calendar to align the events to"></odsl-input-field>
<odsl-input-field name="timezone" class="col-5" type="odsl-timezone" label="Timezone" help="The timezone for the event times"></odsl-input-field>
<odsl-input-field name="source" class="col-1" type="odsl-source" label="Event Source" help="Select the source for the events"></odsl-input-field>
<odsl-input-field name="event" class="col-4" type="odsl-event-list" label="Event List" help="The event list that this timeseries is built from"></odsl-input-field>
<odsl-input-field name="property" class="col-2" type="text" label="Property Name" help="The property in the event for the timeseries values"></odsl-input-field>
<odsl-input-field name="filter" class="col-5" type="text" label="Filter" help="Optional filter to filter the values"></odsl-input-field>
<odsl-data-field name="_type" value="VarEventTimeSeries"></odsl-data-field>
</odsl-input-form>