Skip to main content

Hello, I am new to K2 and have a silly question that is really bothering me. If I am using the K2 Designer (4.7) how on earth do I add text to a form to display some static information and have it formated how I want it?  I have tried using the label control but find it very frustrating.  I would like this text to have line breaks and to appear a specific way.  Is there not a way I can just type on the form in a ‘what you see is what you get fashion’? The Label control does not seem to allow this.

 

Example: I would like to add this text directly beneath a drop-down list (not in a new table column, right below).

 

Some text that shows addition information:

 

  • Test1
  • Test2
  • Test3

Thanks a lot for playing

 

 

The newb here greatly appreciates any help on this matter, thank you.

 

Why not try using Data Label, and enable Literal? You can then insert html into the label to display what you want.


Hi,

 

Can you use Data - LABEl comntrol and set the literal property of the control to "TRUE" so that you can write your HTML tags directly on it using expressions to display however you want.

For isntance if you want to display list static texts, you can add something like below in the control expression

 

Text1 </br>Text </br> Text </br>

 

 

11475i7FEA8BE929803320.png

 

 

Hope it helps!

 

Cheers,

Prajwal Shambhu


The data label is helpful, thank you both. I will have to do some reading up on the data label but do either of you happen to know. With the data label is there a way to expand the text box so that your HTML code could be viewed in a larger window?

What if you had some complex html with lots of tags? Would you just copy this complex text into the single text field in the View Rules/Details window?

14867iEF1B73CB23A08F07.jpg

 

 

For instance, if I wanted to paste this code the text box does not allow it.  Do I have to rewrite this code to be all on one line? 

 

<p>This is some example HTML that I would like to put into a K2 form. <span style="text-decoration: underline;">Some example option</span>:</p>
<ul>
<li><span style="background-color: #33cccc;">Option 1</span>: Denver Colorado</li>
<li><span style="background-color: #ffff00;">Option 2</span>: Sarasota, Florida</li>
<li><span style="background-color: #993366;">Option 3</span>: New Haven, Connecticut</li>
</ul>
<p>Do I really have to past this all as one line into the <span style="color: #ff0000;">Data Label</span> text feild? That seems a little limiting in itself.&nbsp; There has to be a way to open up a larger text box that HTML can be pasted into, right?</p>
<p>&nbsp;</p>
<p>&nbsp;</p>


Reply