Forums

Forums / Developing Portals / HTML - is it possible to render html content on a text box

HTML - is it possible to render html content on a text box

Thread is closed for posting
6 posts, 1 answered
  1. Krishna Hari
    Krishna Hari avatar
    65 posts
    Registered:
    05 Dec 2019
    29 Jan 2020
    Link to this post
    We have data coming from an attribute which shows like this on a form, 
    <span style="font-size: 14px; font-family: Arial;">There is no travel required to serve as a regional advocacy subcommittee member.</span>

    is it possible for actual html to be rendered ??
  2. Omar S
    Omar S avatar
    51 posts
    Registered:
    04 Jul 2019
    20 Feb 2020 in reply to Krishna Hari
    Link to this post
    Hello Krishna

    Yes, you can render HTML content using our TPC Text Field. 

    I created a grid with edit enabled. The edit takes you to a form with a single TPC Text Field. This Text Field represents a column on that grid. I pasted your span tag on the Text Field and submitted it. This directed me back to the grid and I was able to see the html being parsed on the screen with the css taking into effect. 

  3. Krishna Hari
    Krishna Hari avatar
    65 posts
    Registered:
    05 Dec 2019
    20 Feb 2020 in reply to Omar S
    Link to this post
    But I want to display a text field not on a grid, that data with the span tag ia coming from Database, So I just want to display it as a field
    Last modified on 20 Feb 2020 15:02 by Krishna Hari
  4. Omar S
    Omar S avatar
    51 posts
    Registered:
    04 Jul 2019
    Answered
    20 Feb 2020 in reply to Krishna Hari
    Link to this post
    Ah yes, this is possible as well.
    In your TPC Text Field, mark it as read only.

    Then click on the Advanced button on the bottom right 
    Click on Model
    Scroll down to the field "EscapeCrmData" and change it to False 

    Last modified on 20 Feb 2020 16:02 by Omar S
  5. Krishna Hari
    Krishna Hari avatar
    65 posts
    Registered:
    05 Dec 2019
    20 Feb 2020 in reply to Omar S
    Link to this post
    I have tried that and It works only for bold italics etc. not really with style font size
  6. Omar S
    Omar S avatar
    51 posts
    Registered:
    04 Jul 2019
    20 Feb 2020 in reply to Krishna Hari
    Link to this post
    I removed the readonly and changed the font size to something large and it worked for me. Perhaps we can look into this issue by having a screen share tomorrow at 3 PM Eastern Standard Time during a QA session?

    https://www.crmportalconnector.com/images/default-source/forum-solutions/formwithhtml.png
6 posts, 1 answered