Adding CSS and JavaScript to K2 views

  • 9 December 2016
  • 2 replies
  • 31 views

Badge +2

Hi.

 

I've browsed through a couple of posts mentioning the use of the Data Label control in order to add custom CSS and JavaScript to K2 views.

 

I want to make sure that in v4.7 this is the method being used or is there anything else we can do.

 

I also understand there is a 255 character limit, and I'm wondering if this is still true and what are possible workarounds.

 

http://community.k2.com/t5/K2-blackpearl/SmartForms-How-to-execute-JavaScript-via-rules/ta-p/90846

 

http://community.k2.com/t5/K2-Appit/Using-HTML-JavaScript-or-CSS-in-Appit/ta-p/73593

 

 


2 replies

Badge +2

Hi Tiago,

 

For 255 character limit, you may store your CSS/JavaScript code to SQL table. Then retrieve the data thru SmartObject and store in hidden DataLabel.

 

Hope this helps.

 

Regards,

Peter Busto

Using a transfer data action bypasses the character limit.

Reply