So, it’s been a while since i’ve written something. Yes, i’m still alive – a lot has happened in personal and professional life!
With K2 smartforms already being at release 1.0.4, it’s about time I wrote something about it!
A lot of customers are using a custom theme to create forms that are in their company’s style/look&feel.
There’s an article on how to create a theme, but here’s my version of it:
- Copy one of the themes in “C:\Program Files (x86)\K2 blackpearl\K2 smartforms Designer\Styles\Themes” to a new folder, which has the name of your theme.
- Copy the CSS file with the same name, into a new file with the name of the newly copied directory. This will be your theme name.
- Do the same for the C:\Program Files (x86)\K2 blackpearl\K2 smartforms Runtime\Styles\Themes folder and CSS file.
- Add the theme name to the K2 database. Insert into the Form.Theme table. Only the name is enough!
- SmartForms is heavily cached for performance. This cache causes theme changes not to show up. Disable this cache by changing the Forms.CombinedResources.Cache.Enabled value to False in the web.config of both the design and runtime site!
- Recycle the application pool, or do an IISRESET.
And that’s basically it! If you want to quickly change some colours, there’s also a K2 smartforms theme builder on the K2 underground.