Web technologies sometimes need a little help to be as useful as people think they should be. And I think that bar was set by the Microsoft Office desktop application years ago. Particularly with the advancement of Web technologies over the past 20 years, the line between web and desktop applications is becoming ever more blurred, making it harder for users to discern what is still not natively possible on the Web.
One small way in which desktop and web technologies still differ is in actioning a form. It’s pretty common for a user to submit a form in a desktop app with the strike of an enter key instead of clicking on a Submit button; so users find it irksome when a similar form isn’t submitted with the enter key in a web application.
There are a few different ways to impart style into K2 SmartForms. Perhaps the most straightforward way is by using the controls in Designer. Apart from the selection of a style sheet, these controls allow for limited manipulation of style elements on objects placed within a SmartForm. For greater style control, one must consult the style sheets that comprise the themes.
There is, however, another way: One can create a style sheet and implement it directly on a specific SmartForm. The method is hackish and not entirely comfortable architecturally, but it can be done.
This document will walk you through the method used for this “style sheet injection,” and how to deploy the style sheets to other servers.
The K2 SmartForms Picture Control is comprised of:
- The SmartForms Picture control
- A table in the K2 database
- A .NET Generic Handler
Let’s talk about each of these.