Solved

Can't change a form's theme via a rule?


I have a rule that fires off when a print button is clicked. I want to be able to use this rule to change the form's theme to something that shows up better when printed. I added a "Set the Form's properties" action, but in the configuration, the theme property is greyed out and unable to be altered:

 

 

Is this always the case, or is there a way to change a theme in a rule?


icon

Best answer by RaymondJVR 11 July 2019, 08:55

View original

2 replies

Hi KDettman


 


I think only way this to be done is by following the article below:
https://help.k2.com/onlinehelp/k2smartforms/devref/4.7/default.htm#Creating_a_Custom_Theme.html


 


Should you find the information from the article useful or leading you to the answer please mark as "Solution and/or Kudo", as it will assist other k2 developers with relevant information in the near future.


 


Best Regards


Elvis


 


[K2 will not accept any liability for any issues arising from actions taken in respect of the information provided by any forum member]

Good day KDettman


 


The theme property being disabled by default when using the set form properies is as per design however and nice workaround would be to call your form with the desired theme via the URL, for example: Lets say you have form1 which consists of URL https://server.com/Runtime/Runtime/Form/Form1/  you can simply call this form using a navigate to URL rule and modify the URL by adding the below into the URL which would change your URL to look like this:  https://server.com/Runtime/Runtime/Form/Form1/?_theme=Platinum


?_theme=Platinum

*Note: You would need to replace the red section with the correcly spelled theme name, and the theme must be part or the system. This also works with custom build themes that are visibile in K2 designer. https://help.k2.com/onlinehelp/k2smartforms/devref/4.7/default.htm#Creating_a_Custom_Theme.html


Please keep in mind that this will only work with forms and will not work with views.


 


Kind Regards


Raymond


 

Reply