Forum Discussion

ColinFox's avatar
ColinFox
Qrew Member
10 months ago

Display a message using a formula rich text field

Hello,

I am trying to use a formula rich text field to display a message. Has anyone had success in doing so? 

For instance, I want to display a note saying "Only the 1st DO is shown. To see the additional DO, open the Agreement." I then need to apply a Field Condition so the note only shows if a specific field is checked.

Thanks!



------------------------------
Colin Fox
------------------------------

4 Replies

  • Unless I'm misunderstanding the question, this should do the trick in a rich text formula field:

    If([checkbox],
    "Only the 1st DO is shown. To see the additional DO, open the Agreement.")


    ------------------------------
    gary
    ------------------------------
  • If you want to add color use 

    If([checkbox]=true,"<font color=red><b>Only the 1st DO is shown. To see the additional DO, open the Agreement.</b></font>", 

    If([checkbox]=false,"<font color=green><b>More Text Here</b></font>"))



    ------------------------------
    Justin Biggers
    ------------------------------
    • MikeTamoush's avatar
      MikeTamoush
      Qrew Commander

      Justin, do you know the advantages or disadvantages to using your syntax vs something like this:

      "<span style='font-size:12px;color:#e61515'><i>words are going here</i></span>"

      When do  you need to use the span syntax? There is also a <div> syntax. If anyone knows the differences, please let me know!



      ------------------------------
      Mike Tamoush
      ------------------------------
      • JustinBiggers's avatar
        JustinBiggers
        Qrew Trainee

        The difference lies in the elements and styles used in each syntax. Let's break them down: 1. `<font color=red><b>Only the 1st DO is shown. To see the additional DO, open the Agreement.</b></font>`: - `<font>`: This is an old and deprecated HTML element, which was used to define the font, color, and size of the text. It's not recommended to use `<font>` in modern HTML. - `color=red`: This is an attribute of the `<font>` element, setting the text color to red. - `<b>`: This is an HTML element used to make the text bold. 2. `<span style='font-size:12px;color:#e61515'><i>words are going here</i></span>`: - `<span>`: As mentioned previously, `<span>` is an inline element used to apply styles to a portion of text. - `style='font-size:12px;color:#e61515'`: This is an inline CSS style applied to the span element, defining font size (12 pixels) and color (#e61515, which is a shade of red). - `<i>`: This is an HTML element used to make the text italic. To summarize: - The first syntax uses a deprecated `<font>` element and two other elements for coloring and making the text bold. - The second syntax utilizes a modern `<span>` element with inline CSS for styling and an `<i>` element for italicizing the text. It's recommended to use the second syntax with `<span>` and inline CSS styling, as it provides better compatibility with modern web standards and allows for more complex styling.



        ------------------------------
        Justin Biggers
        ------------------------------