Edit Element (Data)
From HLKitWiki
Context: HL Kit … Kit Reference … Data File Reference … Portal Element (Data)
The "edit" Element
The "edit" element is used to allow the user to directly enter a value or text that is then saved into a field. This portal is ideal for allowing the user to enter names or descriptions, as well as entering a wide-ranging or arbitrary value. The complete list of attributes for this element is below.
field Id – Specifies the unique id of the field where the contents to be edited are both retrieved and stored. The field must exist within the pick/thing associated with the containing template. If this portal is not defined within a template, an edit portal is not allowed. maxlength (Optional) Integer – Specifies the maximum number of characters that can be entered for this field. If zero, a numeric value will be edited. Default: "0". ismultiline (Optional) Boolean – Indicates whether the field should be edited as if it contains multi-line text. This attribute only applies to text-based edit portals. Default: "no". readonly (Optional) Boolean – Indicates whether the information within the portal can be edited by the user or is displayed as read-only. Default: "no". format (Optional) Set – Designates any special numeric formatting to be enforced for a value-based field. Must be one of these values:
integer – The contents are edited as an integer value.
float – The contents are edited as a floating-point value.
any – No restrictions are imposed on the contents.
Default: "any".signed (Optional) Boolean – Indicates whether the user can specify a negative value when a value-based field is being edited. Default: "no".
Example
The following example demonstrates what an edit portal might look like. All default values are assumed for optional attributes.
<portal id="hair" style="editNormal"> <edit field="perHair"/> </portal>