Downloading large data files from K2 SmartForms synchronously can sometimes cause performance and user experience issues. This problem is not limited to K2 and this blog post will show you how to apply a pattern to request a data download from K2 and receive the data via email or a download link for download later.
K2 List View allows users to define custom filters to filter list data based on a user’s required filter criteria. The List View filter feature in K2 is called the User Filter and it is very useful as it provides the user the flexibility to choose their own filter criteria for list data. This is especially useful to create tabular-style reports in K2 where there is a requirement to filter the report by multiple criteria. The issue is that you sometimes want to do something in bulk with the filtered data.
K2 ListViews are flexible and extremely feature rich, though in some instances, a simple read-only HTML table populated with database records will do. In this article we will show how to create a simple read-only HTML table populated by data in a SQL database.
I recently encountered a scenario on a very complicated SmartForm where, whenever I tried to add an ‘Execute another rule’ rule to my form, it presented me with this very weird error. It read as follows: Widget Error:Unable to get property ‘text’ of undefined or null reference.
Loading times play a significant part in every application and effectively managing a K2 SmartForm application’s loading time is not a straightforward task. Many factors contribute to slow performance, but, one of the most common causes of slow performance within a K2 SmartForm application is cluttered forms.
Please note, before getting started, check-in the SmartForm will used to generate the PDF file for.
To generate a PDF file in K2 for a K2 SmartForm, follow the following steps –
1. Select the OOB SmartObject PDF Converter and execute ‘Create PDF From URL’.
Recently I had a request to change K2 Smartforms without changing the K2 theme. The K2 theme handles all the look and feel of the form, but the theme can’t be changed in runtime.
K2 injects the selected theme on form load and with a hosted Generic Handler it’s possible to change the styles of the K2 Form dynamically.
Create a Generic Handler in Visual studio with the Context of a .css file. The response content type of the generic handler should be “text/css”. This will return the text in the generic handler as a css file to be loaded in the page. If you don’t know how to create a generic handler you can watch this video https://www.youtube.com/watch?v=2Fz517kKtIE By Ankit Sethi. Below is a code snip of a css Generic handler:
Integration of JQuery with K2 Smartforms
JQuery and other client side scripts can easily be integrated with K2 Smartforms through a K2 Smartforms control present in K2 control panel known as ‘HTML Literal’. Developer just need to drag and drop the HTML Literal control which comes out to be Runtime Literal. Developer can just put their code in Runtime Literal and play around with the controls and can execute control events. As JQuery is very much useful for instant feedback, hence the integration of K2 and JQuery makes the application more robust and user-friendly.