Entity Fields
In order to achieve having as little code as possible, entity field definitions are extended from their traditional database sense. The guiding factor is not the type of the data, but how the end user will consume and alter this data. In other words, the entity fields are a symbioses between the data part and the UI control.
Important: All <wv-field-*/>
support the entity field meta as defined below. When you use the PCField PageCompoment though you need to "map" the component by selecting the corresponding checkbox. This will automatically apply all field meta settings.
Base Field
All field types inherit this class.
name | description |
---|---|
Auditable |
object type: default value: is required: Not implemented yet. Meant to enable history for the field data changes |
Description |
object type: default value: is required: Used in UI Forms. A text that will appear after the input as a description |
EnableSecurity |
object type: default value: is required: If set to TRUE, it will apply the permissions as defined in Permissions |
HelpText |
object type: default value: is required: Used in UI Forms. It will appear as a help icon on the right of the field label and will show this text/html as a tooltip |
Id |
object type: default value: is required: Many processes use this as an identifier of the field. As an example a plugin can check not only if a field with a name exists but also if it matches the ID it requires. |
Label |
object type: default value: is required: Used in UI Forms. A text that will be displayed as a field identifier. |
Name |
object type: default value: is required: Human readable reference of the field a.k.a developer name |
Permissions |
object type: default value: is required: Defines which role has read or update permissions. Applied if EnableSecurity is TRUE |
PlaceholderText |
object type: default value: is required: Used in UI Forms. The value of the placeholder attribute - the input's hint. |
Required |
object type: default value: is required: Used in UI Forms and API. It will present a red asterix on the left of the field's label. Also if no value is provided on record creation, the API will automatically fill in the default value when the field is required. |
Searchable |
object type: default value: is required: If set to TRUE, this will create a database index for quicker selects and sorts by this field. Have in mind that fields that participate in a relation will be indexed automatically |
System |
object type: default value: is required: When creating an application, you will need to define a schema that you need to be managed only by the corresponding plugin and not the administrator. By marking the field as System, the interface will lock certain changes. |
Unique |
object type: default value: is required: This will put the necessary database constrain so only unique values will be possible for this field |
Autonumber
If you need a automatically incremented number with each new record, this is the field you need. You can customize the display format also. Specific properties:
name | description |
---|---|
DisplayFormat |
object type: default value: is required: Influences how the field value is rendered. Use "{0}" where you need the value to be inserted in the template |
DefaultValue |
object type: default value: is required: Set as field value when upon record creation no value is provided. |
StartingNumber |
object type: default value: is required: The starting number of the autonumber field in the database |
FieldType |
object type: default value: is required: GET only property. Returns the field's type |
Checkbox
The simple on and off switch. This field allows you to get a True (checked) or False (unchecked) value. Specific properties:
name | description |
---|---|
DefaultValue |
object type: default value: is required: Set as field value when upon record creation no value is provided. |
FieldType |
object type: default value: is required: GET only property. Returns the field's typ |
Currency
A currency amount can be entered and will be represented in a suitable formatted way. Specific properties:
name | description |
---|---|
Currency |
object type: default value: is required: Localize and influence the field value rendering |
DefaultValue |
object type: default value: is required: Set as field value when upon record creation no value is provided. |
MaxValue |
object type: default value: is required: Set as max html input attribute |
MinValue |
object type: default value: is required: Set as min html input attribute |
FieldType |
object type: default value: is required: GET only property. Returns the field's type |
Date
A data pickup field, that can be later converting according to a provided pattern. Specific properties:
name | description |
---|---|
DefaultValue |
object type: default value: is required: Set as field value when upon record creation no value is provided. |
Format |
object type: default value: is required: Csharp date formatting string |
UseCurrentTimeAsDefaultValue |
object type: default value: is required: Whether to use the record creation date as default |
FieldType |
object type: default value: is required: GET only property. Returns the field's type |
DateTime
A date and time can be picked up and later presented according to a provided pattern. Specific properties:
name | description |
---|---|
DefaultValue |
object type: default value: is required: Set as field value when upon record creation no value is provided |
Format |
object type: default value: is required: Csharp date formatting string |
UseCurrentTimeAsDefaultValue |
object type: default value: is required: Whether to use the record creation date as default |
FieldType |
object type: default value: is required: GET only property. Returns the field's type |
An email can be entered by the user, which will be validated and presented accordingly. Specific properties:
name | description |
---|---|
DefaultValue |
object type: default value: is required: Set as field value when upon record creation no value is provided. |
MaxLength |
object type: default value: is required: set as maxlength attribute of the html input element |
FieldType |
object type: default value: is required: GET only property. Returns the field's type |
File
File upload field. Files will be stored within the system. Specific properties:
name | description |
---|---|
DefaultValue |
object type: default value: is required: Set as field value when upon record creation no value is provided. |
FieldType |
object type: default value: is required: GET only property. Returns the field's type |
Guid
Very important field for any entity to entity relation and required by it. Specific properties:
name | description |
---|---|
DefaultValue |
object type: default value: is required: Set as field value when upon record creation no value is provided. |
GenerateNewId |
object type: default value: is required: If TRUE, will generate a new Guid as a default value |
FieldType |
object type: default value: is required: GET only property. Returns the field's type |
Html
Provides the ability of entering and presenting an HTML code. Supports multiple input languages. Specific properties:
name | description |
---|---|
DefaultValue |
object type: default value: is required: Set as field value when upon record creation no value is provided. |
FieldType |
object type: default value: is required: GET only property. Returns the field's type |
Image
Image upload field. Images will be stored within the system. Specific properties:
name | description |
---|---|
DefaultValue |
object type: default value: is required: Set as field value when upon record creation no value is provided. |
FieldType |
object type: default value: is required: GET only property. Returns the field's type |
Textarea
A textarea for plain text input. Will be cleaned and stripped from any web unsafe content. Specific properties:
name | description |
---|---|
DefaultValue |
object type: default value: is required: Set as field value when upon record creation no value is provided. |
MaxLength |
object type: default value: is required: set as maxlength attribute of the html input element |
FieldType |
object type: default value: is required: GET only property. Returns the field's type |
Multiselect
Multiple values can be selected from a provided list. Specific properties:
name | description |
---|---|
DefaultValue |
object type: default value: is required: Set as field value when upon record creation no value is provided. |
Options |
object type: default value: is required: Options that will be presented to the user for selection. |
FieldType |
object type: default value: is required: GET only property. Returns the field's type |
Number
Only numbers are allowed. Leading zeros will be stripped. Specific properties:
name | description |
---|---|
DecimalPlaces |
object type: default value: is required: To how many decimal places the presented value should be rounded. |
DefaultValue |
object type: default value: is required: Set as field value when upon record creation no value is provided. |
MaxValue |
object type: default value: is required: Set as max html input attribute |
MinValue |
object type: default value: is required: Set as min html input attribute |
FieldType |
object type: default value: is required: GET only property. Returns the field's type |
Password
This field is suitable for submitting passwords or other data that needs to stay encrypted in the database. Specific properties:
name | description |
---|---|
MaxLength |
object type: default value: is required: Maximum length of the password allowed |
MinLength |
object type: default value: is required: Minimum length of the password allowed |
Encrypted |
object type: default value: is required: Whether to store the password encrypted in the database |
FieldType |
object type: default value: is required: GET only property. Returns the field's type |
Percent
This will automatically present any number you enter as a percent value. Specific properties:
name | description |
---|---|
DecimalPlaces |
object type: default value: is required: To how many decimal places the presented value should be rounded. |
DefaultValue |
object type: default value: is required: Set as field value when upon record creation no value is provided. |
MaxValue |
object type: default value: is required: Set as max html input attribute |
MinValue |
object type: default value: is required: Set as min html input attribute |
FieldType |
object type: default value: is required: GET only property. Returns the field's type |
Phone
Will allow only valid phone numbers to be submitted. Specific properties:
name | description |
---|---|
MaxLength |
object type: default value: is required: Maximum length of the password allowed |
DefaultValue |
object type: default value: is required: Set as field value when upon record creation no value is provided. |
FieldType |
object type: default value: is required: GET only property. Returns the field's type |
Select
One value can be selected from a provided list. Specific properties:
name | description |
---|---|
DefaultValue |
object type: default value: is required: Set as field value when upon record creation no value is provided. |
Options |
object type: default value: is required: Options that will be presented to the user for selection. |
FieldType |
object type: default value: is required: GET only property. Returns the field's type |
Text
A simple text field. One of the most needed field nevertheless. Specific properties:
name | description |
---|---|
DefaultValue |
object type: default value: is required: Set as field value when upon record creation no value is provided. |
MaxLength |
object type: default value: is required: Minimum length of the password allowed |
FieldType |
object type: default value: is required: GET only property. Returns the field's type |
Url
A simple text field. One of the most needed field nevertheless. Specific properties:
name | description |
---|---|
DefaultValue |
object type: default value: is required: Set as field value when upon record creation no value is provided. |
MaxLength |
object type: default value: is required: Minimum length of the password allowed |
OpenTargetInNewWindow |
object type: default value: is required: Whether to open the link in a new tab |
FieldType |
object type: default value: is required: GET only property. Returns the field's type |