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 |
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.
Support are included but not limited to the following file types for use with 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 |
You can specify what types of files and limit the size of files for the Attachment control. See the following sections for items that need to be considered when specifying file types and sizes as they will impact runtime behavior of the control.
The following properties are available on the attachment controls:
Properties | Description |
---|---|
Allowed Types |
|
Max Size |
|
When configuring these properties, the application of the Blacklist and Web.config file entries should also be considered.
The Web.config entries are available in the following locations and can be changed according to business requirements:
<install drive>:\Program Files (x86)\K2 blackpearl\K2 smartforms Designer\Web.config
<install drive>:\Program Files (x86)\K2 blackpearl\K2 smartforms Runtime\Web.config
<!--<add key="Forms.Designer.Controls.Attachment.Blacklist" value="ade,adp,app,asa,ashx,asmx,asp,aspx,bas,bat,cdx,cer,chm,class,cmd,cnt,com,config,cpl,crt,cs,csh,der,dll,exe,fxp,gadget,
grp,hlp,hpj,hta,htr,htw,ida,idc,idq,inf,ins,isp,its,its,jar,javascript,jscript,js,jse,json,ksh,lib,lnk,mad,maf,mag,mam,maq,
mar,mas,mat,mau,mav,maw,mcf,mda,mdb,mde,mdt,mdw,mdz,msc,msh,msh1,msh1xml,msh2,msh2xml,mshxml,msi,ms-one-stub,msp,mst,ocx,ops,pcd,pif,pl,plg,prf,prg,printer,ps,ps1,ps1xml,ps2,ps2xml,psc1,psc2,pst,pst,reg,reg,scf,scr,sct,sct,shb,
shs,shs,shtm,shtml,soap,stm,svc,sys,tmp,url,vb,vbe,vbs,vbscript,vxd,vscript,vsix,vsmacros,vsw,ws,wsc,wsf,wsh,xamlx,xnk" />-->
<!--<add key="Forms.Designer.Controls.Attachment.MaxSize" value="5120" />-->
These entries are commented by default but are enforced on the environment with their default values. If you want to change the default values, un-comment the entry and change the value.
The following table is a list of Blacklist file types. These file types cannot be uploaded to the K2 server via the Attachment control. See the Backwards Compatibility section for details on releases prior to K2 smartforms 4.6.11.
Extension | Description |
---|---|
ade | Access Project Extension (Microsoft) |
adp | Access Project (Microsoft) |
app | Executable Application |
asa | ASP declarations file |
ashx | ASP.NET Web handler file. Web handlers are software modules that handle raw HTTP requests received by ASP.NET. |
asmx | ASP.NET Web Services source file |
asp | Active Server Page |
aspx | ASP.net |
bas | BASIC Source Code |
bat | Batch Processing |
cdx | Compound index |
cer | Internet Security Certificate File |
chm | Compiled HTML Help |
class | Java class file |
cmd | DOS CP/M Command File, Command File for Windows NT |
cnt | Help Contents file |
com | Command |
config | Configuration file |
cpl | Windows Control Panel Extension (Microsoft) |
crt | Certificate File |
cs | C# code file |
csh | csh Script |
der | DER Encoded X509 Certificate File |
dll | Windows dynamic-link library |
exe | Executable File |
fxp | FoxPro Compiled Source (Microsoft) |
gadget | Windows Vista gadget |
grp | SmarterMail group file |
hlp | Windows Help File |
hpj | Help project file |
hta | Hypertext Application |
htr | Script file |
htw | HTML document |
ida | Internet Information Services file |
idc | Internet database connector file |
idq | Internet data query file |
inf | Information or Setup File |
ins | IIS Internet Communications Settings (Microsoft) |
isp | IIS Internet Service Provider Settings (Microsoft) |
its | Internet Document Set, Internet Translation |
jar | Java Archive |
javascript | JavaScript Source Code |
jscript | JavaScript Source Code |
js | JavaScript Source Code |
jse | JScript Encoded Script File |
json | JavaScript Object Notation file |
ksh | UNIX Shell Script |
lib | Windows static-link library |
lnk | Windows Shortcut File |
mad | Access Module Shortcut (Microsoft) |
maf | Access (Microsoft) |
mag | Access Diagram Shortcut (Microsoft) |
mam | Access Macro Shortcut (Microsoft) |
maq | Access Query Shortcut (Microsoft) |
mar | Access Report Shortcut (Microsoft) |
mas | Access Stored Procedures (Microsoft) |
mat | Access Table Shortcut (Microsoft) |
mau | Media Attachment Unit |
mav | Access View Shortcut (Microsoft) |
maw | Access Data Access Page (Microsoft) |
mcf | Multimedia Container Format |
mda | Access Add-in (Microsoft), MDA Access 2 Workgroup (Microsoft) |
mdb | Access Application (Microsoft), MDB Access Database (Microsoft) |
mde | Access MDE Database File (Microsoft) |
mdt | Access Add-in Data (Microsoft) |
mdw | Access Workgroup Information (Microsoft) |
mdz | Access Wizard Template (Microsoft) |
msc | Microsoft Management Console Snap-in Control File (Microsoft) |
msh | Microsoft Shell |
msh1 | Microsoft Shell |
msh1xml |
Microsoft Shell |
msh2 |
Microsoft Shell |
msh2xml |
Microsoft Shell |
mshxml |
Microsoft Shell |
msi | Windows Installer File (Microsoft) |
ms-one-stub | Microsoft OneNote stub |
msp | Windows Installer Update |
mst | Windows SDK Setup Transform Script |
ocx | Object Linking and Embedding (OLE) Control Extension |
ops | Office Profile Settings File |
pcd | Visual Test (Microsoft) |
pif | Windows Program Information File (Microsoft) |
pl | Perl script |
plg | Developer Studio Build Log |
prf | Windows System File |
prg | Program File |
printer | Printer file |
ps | Windows PowerShell |
ps1 | Windows PowerShell |
ps1xml | Windows PowerShell |
ps2 | Windows PowerShell |
ps2xml | Windows PowerShell |
psc1 | Windows PowerShell |
psc2 | Windows PowerShell |
pst | MS Exchange Address Book File, Outlook Personal Folder File (Microsoft) |
reg | Registration entries |
scf | Windows Explorer command file |
scr | Windows Screen Saver |
sct | Windows Script Component, Foxpro Screen (Microsoft) |
shb | Windows Shortcut into a Document |
shs | Shell Scrap Object File |
shtm | HTML file that contains server-side directives |
shtml | HTML file that contains server-side directives |
soap | Simple Object Access Protocol file |
stm | HTML file that contains server-side directives |
svc | Windows Communication Foundation (WCF) service file |
sys | Real mode device driver |
tmp | Temporary File/Folder |
url | Internet Location |
vb | VBScript File or Any Visual Basic Source |
vbe | VBScript Encoded Script File |
vbs | VBScript Script File, Visual Basic for Applications Script |
vbscript | VBScript Script File, Visual Basic for Applications Script |
vxd | Virtual document exchange |
vscript | VBScript Script File, Visual Basic for Applications Script |
vsix | Visual Studio Extension |
vsmacros | Visual Studio .NET Binary-based Macro Project (Microsoft) |
vsw | Visio Workspace File (Microsoft) |
ws | Windows Script File |
wsc | Windows Script Component |
wsf | Windows Script File |
wsh | Windows Script Host Settings File |
xamlx | Visual Studio Workflow service file |
xnk | Exchange Public Folder Shortcut |
Rules can be used to set file types and sizes at runtime such as the Set a control’s properties rule action. See the Control and Form Properties Actions topic for more detail.
The global maximum File and Image size that can be attached is dictated by the following setting in the Web.config file in the system.web section.
<httpRuntime maxRequestLength="16384" />
When creating a Form that consists of many Views and multiple States the Form rules might not be visible after adding an additional State. This occurs when the Form definition increases and exceeds the Maximum Request Length specified in the Web.config. The maxRequestLength can be edited to enlarge the size of the Form definition.
The default maximum value is set as 16384 KB (kilobyte) which is an integer value and can be changed to the required value in kilobytes. See the following link for more details about the maxRequestLength setting: https://msdn.microsoft.com/en-us/library/system.web.configuration.httpruntimesection.maxrequestlength(v=vs.110).aspx
<install drive>:\Program Files (x86)\K2 blackpearl\K2 smartforms Designer
<install drive>:\Program Files (x86)\K2 blackpearl\K2 smartforms Runtime
requestFiltering is a feature that can be configured in Internet Information Services (IIS).
<system.webServer>
<security>
<requestFiltering>
<requestLimits maxAllowedContentLength="1073741824"></requestLimits>
</requestFiltering>
</security>
</system.webServer>
See the following link for more detail: https://www.iis.net/configreference/system.webserver/security/requestfiltering/requestlimits
If this setting is enabled on your environment, it is important to note that the minimum value of the maxRequestLength setting, the requestFiltering setting and the MaxSize setting will limit the attachments upload.
Beginning with K2 smartforms 4.6.11, previously allowed files may now not be allowed due to the inclusion of the Blacklist feature. To update the Blacklist to include or remove certain files, see the Web.config entries section of this topic. Change the Web.config file to exclude those files you want to upload and include files that should be restricted. Following is a list of Blacklist files restricted prior to K2 smartforms 4.6.11. This restriction was not previously configurable.
cpl, vxd, cmd, pif, com, msi, scr, ps, wsh, ocx, dll, bat, exe, vbs, vbe,.vb, aspx, vbscript, vscript, javascript, jscript, js.
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.
Control | Offline Support | Comments |
---|---|---|
Content | Control loads user defined content via a URL so it is not made available offline | |
Label |
![]() |
|
Picture |
![]() |
The control is available offline but the image is cached on client side |
AutoComplete |
![]() |
The control is available offline when using a SmartObject as the data source. Using static list data as the data source is not available offline |
Calendar |
![]() |
|
Check Box |
![]() |
|
Check Box List |
![]() |
|
Choice |
![]() |
The control is available offline when using a SmartObject as the data source. Using static list data as the data source is not available offline |
Data Label |
![]() |
|
Drop-Down List |
![]() |
|
Hyperlink | ||
List Box |
![]() |
|
List Display |
![]() |
|
Lookup | The control requires a subview / subform. Only one Form/View can be offline at one time and related Views/Forms cannot be taken offline. Any Form/View that is not loaded as part of the Initialize step will not work offline. | |
Multi-Select |
![]() |
|
Picker |
![]() |
|
Radio Button |
![]() |
|
Radio Button Group |
![]() |
|
Radio Button List |
![]() |
|
Rating |
![]() |
|
Rich Text |
![]() |
The following Toolbar functionality is not available offline:
|
SharePoint Hyperlink | ||
Slider |
![]() |
|
Text Area |
![]() |
|
Text Box |
![]() |
|
Tree |
Cached data is loaded but no further functionality is available offline such as icons displaying and expansion |
|
Button |
![]() |
|
Timer |
![]() |
|
ToolBar Button |
![]() |
|
File Attachment |
![]() |
|
Image Attachment |
![]() |
|
Table |
![]() |
|
Save As PDF | ||
Worklist |
![]() |
The following functionality is not available offline:
|
Location Services |
![]() |
Depends on GPS / WIFI. If online and WIFI is off, the old location is returned |
Activity Instances Chart | Cached data is loaded but no further functionality is available offline | |
Activity Instances Grid |
Cached data is loaded but no further functionality is available offline |
|
Report Header | Data can't be configured | |
User Performance Chart |
Cached data is loaded but no further functionality is available offline |
|
User Performance Grid |
Cached data is loaded but no further functionality is available offline |
|
Workflow Data Grid |
Cached data is loaded but no further functionality is available offline |
|
Workflow Duration Chart |
Cached data is loaded but no further functionality is available offline |
|
Workflow Instances Chart |
Cached data is loaded but no further functionality is available offline |
|
Workflow Instances Grid |
Cached data is loaded but no further functionality is available offline |
|
Workflow References Grid |
Cached data is loaded but no further functionality is available offline |
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
|