When selecting the Controls tab in the Toolbox menu, a list of controls are displayed which can be used to design the View or Form. To apply formatting and styling on a control, see the Style Builder. Each control can have it's own format and style such as applying percentage or decimal formatting on a control. All controls are available on View level and where relevant on Form level.
The following types of controls are available:
Control | Description |
---|---|
Display | |
Content | An Inline Frame (iFrame) representing a nested browsing context, effectively embedding another View/Form into the current View/Form or display a different website within the current View/Form |
Label | Used to display text that a user can't change |
Picture | Used to display an image |
Input | |
AutoComplete | Provides suggestions while you type into the field. This control is available when installing the K2 smartforms Control Pack |
Calendar | Provides date-picking functionality |
Check Box | Commonly used to present a Yes/No or True/False selection to the user |
Check Box List | Provides a multi selection check box group that can be dynamically created by binding the control to a data source |
Choice | Provides the user with the ability to select a single or multiple values from a list of options. This control is available when installing the K2 smartforms Control Pack |
Data Label | Provides the ability to capture data and perform a validation according to specified patterns |
Drop-Down List | Allows the user to select a single item from a drop-down list |
Hyperlink | Displays an HTML link to an address, which opens in the default browser for the computer |
List Box | Single column multi-select control, enabling the user to select one or more items at once. This control is available when installing the K2 smartforms Control Pack |
List Display | Displays a list from a SmartObject |
Lookup | Displays a lookup from a SmartObject |
Multi-Select | Allows comfortable input of multiple selections of items from a defined number of items. This control is available when installing the K2 smartforms Control Pack |
Picker | Used to provide client-side multiple selection functionality with resolve and search functions |
Radio Button | Control contains one Radio Button that can interact with rules individually. Multiple Radio Button controls can be grouped together by using the Radio Button Group control which in effect provides a list of options. These Radio Button controls can still interact with rules individually |
Radio Button Group | Control used to group Radio Button controls to form a list of options. This control is used for grouping purposes and is not visible at runtime |
Radio Button List | Provides a list control that encapsulates a group of radio button controls |
Rating | Provides an intuitive rating experience that allows users to select the number of stars that represents their rating |
Rich Text | Provides the user with text and graphics interchange. This control is available when installing the K2 smartforms Control Pack |
SharePoint Hyperlink | Allows the user to display a hyperlink or picture. This control is available when installing the K2 smartforms Control Pack |
Slider | Lets the user select from a range of values by moving a Thumb control along a Track |
Text Area | Allows the user to create a multiline text box |
Text Box | Used to display information entered by the user at runtime |
Tree | Used to display a hierarchical list of information. This control is available when installing the K2 smartforms Control Pack |
Action | |
Button | Allows the user to click on it to perform an action. The Button control can display both text and images |
Toolbar Button | Contains one or more buttons |
Timer control | Allows you to repeatedly execute a rule after a period of time. This control is available when installing the K2 smartforms Control Pack |
Attachment | |
File Attachment | Enables the user to attach a file, displaying a progress bar during the upload of the attachment |
Image Attachment | Enables the user to attach an image, displaying a progress bar during the upload of the attachment |
Layout | |
Table | Enables the user to create a table |
Export | |
Save as PDF | Takes a snapshot of the View/Form at a particular point in time when an Event is executed, for example when a Button is clicked |
Worklist | |
Worklist | Predefined list containing all the work items for the current user that has been generated and assigned by the workflow. This control is available when installing the K2 smartforms Control Pack |
Information | |
Location Services | Provides location and time information based on the Global Positioning System (GPS) of mobile devices. This control is available when installing the K2 smartforms Control Pack |
Reports | |
Activity Instances Chart | Graphic display of workflow activities according to specific filter criteria. The data is displayed as an aggregated view of the activity. This control is available when installing the K2 smartforms Control Pack |
Activity Instances Grid | Lists all activity instances of a workflow according to specific filter criteria. The data is displayed as detailed information pertaining to an activity instance or instances. This control is available when installing the K2 smartforms Control Pack |
Report Header | An interactive reporting dashboard allowing a user to view different types of workflow reports. The Report Header contains common properties that can be used to filter Charts or Grids added to the View. This control is available when installing the K2 smartforms Control Pack |
User Performance Chart | Graphic display of users who have participated in the selected activity according to specific filter criteria. The data is displayed as an aggregated view of instances per user. This control is available when installing the K2 smartforms Control Pack |
User Performance Grid | Lists users who have participated in the selected activity with activity data according to specific filter criteria. The data is displayed as detailed information pertaining to activity instances per user. This control is available when installing the K2 smartforms Control Pack |
Workflow Data Grid | Lists all Data Fields per workflow instance according to specific filter criteria. This control is available when installing the K2 smartforms Control Pack |
Workflow Duration Chart | Graphic display of the average duration of workflow instances over time, according to specific filter criteria. The data is displayed as an aggregated view of the workflow. This control is available when installing the K2 smartforms Control Pack |
Workflow Instances Chart | Graphic display of workflows according to specific filter criteria. The data is displayed as an aggregated view of the workflow. This control is available when installing the K2 smartforms Control Pack |
Workflow Instances Grid | Lists all workflow instances according to specific filter criteria. The data is displayed as detailed information pertaining to a workflow instance or instances. This control is available when installing the K2 smartforms Control Pack |
Workflow References Grid | Lists all Workflow Item References per workflow instance according to specific filter criteria. The reference can be further expanded to view the related data in runtime. This control is available when installing the K2 smartforms Control Pack |
To add a control to a View, select the Controls tab in the Toolbox. Click on the required control in the list and drag and drop it on the View canvas.
In order to change the type of a control that is linked to a field, click on the control on the canvas, then click on the Change Control icon in the Toolbar. The Change Control dialog opens. Select the new control type and click OK.
When a control is dragged from the Toolbox of a View, it is bound to that SmartObject property. When using the same control more than once on a View, all of those controls stay bound to that property unless you specifically unbind the control. Controls can be unbound by selecting the control and clicking on the Unbind button in the canvas Toolbar. When one of the controls bound to the property is updated, all of the related controls linked to that property will be updated as well.
It is therefore important to note that when using the dependent drop down scenario on a List View, for example, one needs to unbind the parent controls from the foreign keys that were originally dragged upon the canvas. When one drop down changes, it applies the change to the next control, which is bound to the same field, and will attempt to update all the related controls. This will cause a repeating cycle of events.
This is also applicable if a foreign key value is transferred from the one drop down to the other as the primary key value. When the ID's stop matching, this will seem as if the wrong data is returned to the user or unexpected behavior may occur.
The last control that is changed and also linked to a property, determines that property’s value. It is imperative to remember that if a control is not specifically required to save (or show) a particular property’s value, it should not be bound to that property.
Keyboard accessibility features are available to most input and certain other controls to ease the use of controls at runtime. Access keys can be used for accessibility to interact with controls or using the keyboard.
Examples:
Tip when using Safari Browser
When tabbing between controls using the Safari browser, ensure that the setting Press Tab to highlight each item on a webpage is selected under Preferences > Advanced. Without this setting selected all anchor elements (contained in controls that have buttons) will be skipped when you tab through the controls and thus be unreachable with the keyboard
When using a control, it is important to know that all files and images are saved as base64 encoded values.
The following file types are supported and can be used in controls.
File Type | File Extension |
---|---|
Comma Separated Values File | csv |
HTML Document | html/htm |
Compiled HTML Help File | chm |
Compressed Folder | zip |
Microsoft Office InfoPath Form Template | xsn |
PDF File | |
Microsoft Office Excel Worksheet | xls/xlsx |
Microsoft Office Word Document | doc/docx |
Text Document | txt |
XML Document | xml |
Microsoft Office OneNote Section | one |
Microsoft Office PowerPoint Presentation | ppt/pptx |
PNG Image | png |
Bitmap Image | bmp |
JPEG Image | jpeg/pjpeg/jpg |
GIF Image | gif |
TIF Image | tif |
MPEG-1 Audio Layer 3 | mp3 |
WaveForm Audio File | wav |
Windows Media Video | wmv |
Windows Media Audio | wma |
MPEG 4 Audio File | m4a |
Protected AAC File | m4p |
Audio Video Interleave | avi |
Moving Picture Experts Group | mpeg |
Flash Video | flv |
Moving Picture Expert Group-4 | mp4 |
The maximum File and Image size that can be attached with the File/Image attachment control is dictated by the following setting in the web.config file in the system.web section.
<httpRuntime maxRequestLength="8192" />
The web.config file can be found in the following location:
C:\Program Files (x86)\K2 blackpearl\K2 smartforms Designer
The default value is set as 8192 KB (kilobyte) which is an integer value and can be changed to the required value in KB
When selecting the Controls tab in the Toolbox menu of a View or Form, a list of controls are displayed which can be used to design the View. Controls are supported differently per drop zone and type of View.
When a control is dragged from the Toolbox of a View from an existing field, it is bound to that SmartObject property (field). When using the same control more than once on a View, all of those controls stay bound to that field unless you specifically unbind the control. Controls can be unbound by selecting the control and clicking on the Unbind button in the canvas Toolbar. When one of the controls bound to the field is updated, all of the related controls linked to that field will be updated as well.
If a control is dragged from the Toolbox of a View into a blank drop zone such as the View toolbar or control bar, the control is unbound.
To use the Data Label control to display a default value on the List View or Editable List View, follow the steps below:
The Data Label control will be blank when adding a new entry as the default will apply as soon as the entry is saved or a refresh is done.
The following matrix shows the properties applicable to each control and the properties that are common to all Controls. To apply formatting and styling on a control, see the Style Builder. Each control can have it's own format and style such as applying percentage or decimal formatting on a control for example.
When a control is dragged from the Toolbox of a View, it is bound to that SmartObject property. When using the same control more than once on a View, all of those controls stay bound to that property unless you specifically unbind the control. Controls can be unbound by selecting the control and clicking on the Unbind button in the canvas Toolbar. When one of the controls bound to the property is updated, all of the related controls linked to that property will be updated as well.
It is therefore important to note that when using the dependent dropdown scenario on a List View for example, one needs to unbind the parent controls from the foreign keys that were originally dragged upon the canvas. When one dropdown changes, it applies the change to the next control, which is bound to the same field, and will attempt to update all the related controls. This will cause a repeating cycle of events.
This is also applicable if a foreign key value is transferred from the one dropdown to the other as the primary key value. When the ID's stop matching, this will seem as if the wrong data is returned to the user or unexpected behavior may occur.
The last control that is changed and also linked to a property, determines that property’s value. It is imperative to remember that if a control is not specifically required to save (or show) a particular property’s value, it should not be bound to that property.
How to use rules to change the edit state of View and Form controls and tables
Video | Links | Learn | Support |
No videos found for this article K2 on YouTube
No Additional links found for this article
No self-learning content for this article Try some scenarios...
No relevant support links available for this article
|