SimpleProperty¶
The Simple Property control is a simple label that users can use to convey any information.
SimpleProperty Properties¶
Property | Type | Required | Default |
---|---|---|---|
AlternateInput | enum |
Optional | |
Caption | string |
Optional | |
FormatRule | Rule | Optional | "" |
HelperText | string |
Optional | |
IsEditable | boolean |
Optional | true |
IsVisible | boolean |
Optional | true |
KeyboardType | enum |
Optional | |
OnValueChange | ActionOrRule | Optional | |
PlaceHolder | string |
Optional | |
Styles | object |
Optional | |
Value | string |
Optional | |
_Name | string |
Required | |
_Type | const |
Required | |
validationProperties | ValidationProperties | Optional |
AlternateInput¶
Show the alternate input besides keyboard typing.
For Android, the accepted values are None
and Barcode
. For iOS, this control is displayed as a generic action button.
These are the list of barcode formats have been tested correctly in MDK on both iOS and Android. There may be additional formats supported beyond this list.
- type:
enum
The value of this property must be equal to one of the known values below.
Value | Description |
---|---|
None |
No secondary action. |
Barcode |
To allow the use of camera to scan barcode and QR Code. |
Caption¶
The key name of the property.
- type:
string
FormatRule¶
If specified, the given rule executes when a control is initialized or when a value changes.
- type: Rule
- default:
""
HelperText¶
Helper text to be displayed if there is no validation view.
- type:
string
IsEditable¶
Disables or enables interaction.
- type:
boolean
- default:
true
IsVisible¶
Sets the visibility of the control.
- type:
boolean
- default:
true
KeyboardType¶
Show the appropriate keyboard type. To streamline data entry, the keyboard displayed when editing a SimplePropertyFormCell should be appropriate for the type of content in the field. If your app asks for an email address, for example, it should display the email address keyboard.
Because Number keyboard type in Samsung Android device cannot enter comma character, but comma is used as decimal seperator in some region (Italian / German,...), so the full keyboard will be used in this scenario.
- type:
enum
The value of this property must be equal to one of the known values below.
KeyboardType Known Values¶
Value | Description |
---|---|
DateTime |
|
Default |
|
Email |
|
Number |
|
Phone |
|
Url |
|
Password |
|
NumberPassword |
OnValueChange¶
Action or rule to perform after value changed.
- type: ActionOrRule
- Formatter and Binding are not supported
PlaceHolder¶
Placeholder text to display if Value
is empty.
- type:
string
Styles¶
Set styles for Background
, Caption
and Value
.
- type:
object
with following properties.
Property | Type | Required | Default |
---|---|---|---|
Background | string |
Optional | |
Value | string |
Optional | |
Caption | string |
Optional |
Background¶
The string value is a style class name for Background
.
Value¶
The string value is a style class name for Value
.
Caption¶
The string value is a style class name for Caption
.
Value¶
Text to display.
- type:
string
_Name¶
- type:
string
_Type¶
- type:
const
The value of this property must be equal to:
"Control.Type.FormCell.SimpleProperty"
validationProperties¶
The validation view properties.
- type: ValidationProperties
Examples¶
{
"_Type": "Page",
"_Name": "FormCellsPage",
"Caption": "FormCell Example",
"Controls": [{
"_Type": "Control.Type.FormCellContainer",
"_Name": "FormCellContainer",
"Sections": [{
"Caption": "Section1",
"Controls": [{
"_Type": "Control.Type.FormCell.SimpleProperty",
"_Name": "SimplePropertyFormCell",
"Caption": "Location",
"PlaceHolder": "Address",
"Value": "127 Higgins Drive, Palo Alto",
"AlternateInput": "Barcode",
"IsEditable": true,
"HelperText": "This is helper text",
"validationProperties": {
"ValidationMessage": "Validation Message",
"ValidationMessageColor": "ff0000",
"SeparatorBackgroundColor": "000000",
"SeparatorIsHidden": false,
"ValidationViewBackgroundColor": "fffa00",
"ValidationViewIsHidden": false
},
"Styles": {
"Background": "SimplePropertyFormCellBackground",
"Caption": "SimplePropertyFormCellCaption",
"Value": "SimplePropertyFormCellValue"
}
}]
}]
}]
}
Style Classes Definition¶
/* SimpleProperty Form Cell - Background */
.SimplePropertyFormCellBackground {
background-color: yellow;
}
/* SimpleProperty Form Cell - Caption */
.SimplePropertyFormCellCaption {
background-color: #0000FF;
color: black;
font-style: UIFontTextStyleBody; /* iOS Only */
font-typeface: bold; /* Android Only */
font-size: 16px;
}
/* SimpleProperty Form Cell - Value */
.SimplePropertyFormCellValue {
background-color: #0000FF; /* iOS Only */
color: black;
font-style: UIFontTextStyleBody; /* iOS Only */
font-typeface: bold; /* Android Only */
font-size: 16px;
}