How to remove a   (Non-Breaking space) appearing in form widget

Hi,

I'm getting in some data and trying to display it in a form widget that isn't editable. In the description field I am seeing   and & in the text. Is there a way to remove these from the input widgets used by the form or is using an expression just easier?

I'm on Outsystems 10 for reference.

Thanks.

Can you provide a screenshot?

Hi Christopher,

You can use Expression for show non-editable data.

Like

You can remove input from form or if you have need to both than you can use if widget when show non editable data than use expression else use input.


Hope this will help you.

Regards

Rahul

Mariano Picco wrote:

Can you provide a screenshot?

  Here's a screen shot of the description


Rahul Sahu wrote:

Hi Christopher,

You can use Expression for show non-editable data.

Like

You can remove input from form or if you have need to both than you can use if widget when show non editable data than use expression else use input.


Hope this will help you.

Regards

Rahul

 the data is always just going to be for display purposes. I am just wondering if there is a way to escape content in a form/input widget like there is in an expression so that i can keep the formatting. If i use an expression I'll lose access to the set size of the input widget and a scrolling bar for larger descriptions


Thanks,

Chris

 

I'm still not understanding your trying to do. Can you provide screenshots of how it's not working and what you'd expect it to look like?

Mariano Picco wrote:

I'm still not understanding your trying to do. Can you provide screenshots of how it's not working and what you'd expect it to look like?

 

 the top one is an expression with escaped content and the bottom is an input widget from a form. I could use it but if the description is very long then it will take up a lot of room on the screen and be hard to use and look bad. I am wondering if there is a way to escape the html in the input widget so i can keep the set size and have a scroll bar when the description is a lot longer.


Thanks

Christopher Boal wrote:

Mariano Picco wrote:

I'm still not understanding your trying to do. Can you provide screenshots of how it's not working and what you'd expect it to look like?

 

 the top one is an expression with escaped content and the bottom is an input widget from a form. I could use it but if the description is very long then it will take up a lot of room on the screen and be hard to use and look bad. I am wondering if there is a way to escape the html in the input widget so i can keep the set size and have a scroll bar when the description is a lot longer.


Thanks

 Set this content in expression and set property of expression-

escape content=no.

Hope this wil help you.

Regards

Rahul

 

Hi Christopher,


Just to offer a different perspective here : 

I don't know where you are getting the content for your screen widgets from (maybe an api ??) but it seems to me that you want to be dealing with pieces of text, not with html.  So it feels to me that there is a mismatch between what you would like to get to display on your screens (plain text) and what is being delivered to you (marked up text).  

I would try to solve this mismatch as close to the source of it as possible.  So, number 1 would be to see if the service providing the information to you, couldn't produce plain text instead of html.  Saves you from doing any work ;-)  although there's a high chance that they don't have time or don't care.

So what I'd do then is transform it from html to plain text as soon as I get it, don't wait until you are displaying it on a screen.   For example, if you are calling an api to retrieve it, call DecodeHTML on all api result attributes in a wrapper around the actual api call.

Then in the rest of your application, you don't have to worry about these html artefacts.


Dorine

Dorine Boudry wrote:

Hi Christopher,


Just to offer a different perspective here : 

I don't know where you are getting the content for your screen widgets from (maybe an api ??) but it seems to me that you want to be dealing with pieces of text, not with html.  So it feels to me that there is a mismatch between what you would like to get to display on your screens (plain text) and what is being delivered to you (marked up text).  

I would try to solve this mismatch as close to the source of it as possible.  So, number 1 would be to see if the service providing the information to you, couldn't produce plain text instead of html.  Saves you from doing any work ;-)  although there's a high chance that they don't have time or don't care.

So what I'd do then is transform it from html to plain text as soon as I get it, don't wait until you are displaying it on a screen.   For example, if you are calling an api to retrieve it, call DecodeHTML on all api result attributes in a wrapper around the actual api call.

Then in the rest of your application, you don't have to worry about these html artefacts.


Dorine

 Hi Dorine,

I believe im currently getting the data in through an extension which gives me tables to work with. The description attribute is text so I'm not sure if there is a way to change it over before I set the value in the input widget. I can only find an EncodeHTML action in Outsystems (as I said im currently running version 10), is there a DecodeHTML that comes from Outsystems?


Thanks,

Chris


 

Solution

oh, ok, euhm not sure it's available on OS 10, it's in component HTMLRenderer

Solution

Dorine Boudry wrote:

oh, ok, euhm not sure it's available on OS 10, it's in component HTMLRenderer

 Thanks,

Yes the component is available on OS 10. Thank you very much