Join us Dec. 16 for The Community Hour, our first global virtual User Group event!

Is it possible to add a bullet list to a multi line text variable

Gemma4
Mega Sage

Hi Everyone,

I have a requirement requesting the multi line text be preformatted with a  bulleted list to make it visibly easier for the user to complete. Is this possible? 

 

Examples:  Text of Instructions to complete

  • Dependency 1
  • Dependency 2

 

 

5 REPLIES 5

Craig Gruwell
Mega Sage

Hi Gemma4,

 

Is this field going to be editable?  If not, you can use the Rich Text Label variable type. 

Types of service catalog variables 

Hi @Craig Gruwell Thank you for the feedback! Yes the field needs to be editable by the user in a multi line text. I've seen bullet list displayed on the portal but never for a user to utilize. 

Riya Verma
Kilo Sage

Hi @Gemma4 ,

 

Hope you are doing great.

Here's how you can achieve this:

  1. Create a new field of type 'HTML' on the form where you want the preformatted text.

  2. Add the following HTML and JavaScript code to the field's value:

 

<textarea id="myTextarea" rows="5" cols="50"></textarea>
<script>
  var textArea = document.getElementById("myTextarea");
  textArea.addEventListener("keydown", function(e) {
    if (e.key === "Tab") {
      e.preventDefault();
      var start = this.selectionStart;
      var end = this.selectionEnd;
      this.value =
        this.value.substring(0, start) +
        "\t" +
        this.value.substring(end);
      this.selectionStart = this.selectionEnd = start + 1;
    }
  });
</script>

 

  • Save the changes and test the form.

 

HI @Riya Verma Thank you so much for the feedback! Do I need to create a business rule to add the code above to the html variable I just created? I've normally justed used out of the box functionality so not sure how to really do this and appreciate your insight. 

thanks

Gemma