Calculated Value Displaying html tags

  • 27 September 2017
  • 12 replies
  • 44 views

Badge +2

I have a bilingual form. Instead of regular labels, I used calculated value control to display the appropriate language. All works fine. However, when I select the item to view it, it also shows the html tags (see image).

Can someone please advise how to prevent the html tags to display in view item?

Thank you.


12 replies

Userlevel 5
Badge +14

could you post a formula how do you "calculate" translation?

have you enabled to recalculate in VIEW mode for the control?

Badge +2

Hi Emha,

I have a separate list containing the text in each language. So, in the form I use the following formula to call the appropriate text:

lookup("FormLabels","FieldKey","Name",calcFormLanguage<javascript:void(0);>)

Thanks for your help.

Glenda

Badge +5

Hi ‌, do you think you can share how do you get the output column? or how calcFormLanguage looks like? is this a JavaScript function?

Userlevel 5
Badge +14

this syntax seems to me suspicious. is it really the way how you use it.

if I try construct like this it just generates error.

can you post screenshot of your configuration?

as well clarify what "calcFormLanguage" and how does it exactly look like.

Badge +2

I have a calculated value control to save the value that the user selected. It is not a JavaScript function.

Badge +2

Marian,

See below the configuration I used.

Userlevel 5
Badge +14

ok, these configurations seems to be correct.

how do texts look like in list view? I assume you do not store there HTML markups by purpose...

what's datatype of field you read texts from? isn't it by any chance multiline text with reach text enabled?

can you try following formula to determine whether markups are return from lookup function or added in form

"x" + lookup("FormLabels","FieldKey","Name",calcFormLanguage) + "x"

Badge +5

Hi Glenda Lopez‌, can you refer to the item inside list FormLabels with FieldKey column equals Name?
What is the value inside English column for that item?

Badge +2

I was able to resolve the mystery. I am using multiline text fields "Rich Text". Once, I changed to "plain text" the display was clean without HTML codes. 

The only down side is that I will not able to show a nice format in the form.

Anyways this will work for now, but if any of you find a way of using multiline text "Rich Text" on bilingual forms please let me know.

Thanks.

Userlevel 5
Badge +14

calculated value control doesn't support neither multiline text nor reach text formatted content.

if you wanted multiline and reach text labels you would need to use javascript.

what you can however do is to configure control's formatting at design time or apply a CSS styling

Badge +2

Can you please show me an example or a link where I can learn how to configure control's formatting at design time or an CSS styling?

Userlevel 5
Badge +14

to configure direct control's formatting there are respective icons on the ribbon

208904_pastedImage_1.png

CSS class  you can configure in control's settings

208905_pastedImage_2.png

CSS class definition can be put into form's settings, either directly in 'Custom CSS' or as a inlude in 'Custom CSS includes'

208906_pastedImage_3.png

Reply