Is there any built in feature available in K2 to mark required filed control as red color?

  • 21 March 2016
  • 1 reply
  • 21 views

Badge +2
Hi I could not able to find any available feature to add some color to required field control as attached in screen shot for the required fields on View. Could any one please let me know is there any feature available to do this. I know there are ways to do this by adding CSS, just want to know in K2, is there any optiona available by default. Thansk, Raji
14368i3D624EB4064D6D7A.png

1 reply

Badge +10

I don't know if there is actually some kind of default feature, however with some CSS you will be able to acomplish this fairly easy.

 

For the purpose of demonstration I got an Email View that like to have Subject as required field. 

I'm just going to make the text Red or if the field Subject has a value turns to regular form colors.

 

12448i3BCE08F80AF9D838.jpg

 

As you can see because of the rules if the Subject field is empty will display the expression of the Red Required. Later if the subject has some data will display normal. 

 

Will leave as your homework to figure it out the exactly CSS styling presented in your original request to render the Red bar on the left of the obejct... that will be kind of cool, because will not require to create custom fields, just re-use the same one over and over.

 

Another thing to noticed. at first have to setup an Initialize rule to make sure the value of the Subject1 appear as Red, however if you check into the field rules make that value as defaults and will not required to have an oninitialize rule. will work directly putting as default value in the properties of the control.

 

Hope this helps.

 

Dino.

Reply