Is it possible to add a bullet list to a multi line text variable
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-16-2023 10:33 AM
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-17-2023 03:47 AM
Hi Gemma4,
Is this field going to be editable? If not, you can use the Rich Text Label variable type.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-17-2023 07:16 AM
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-17-2023 10:49 AM
Hi @Gemma4 ,
Hope you are doing great.
Here's how you can achieve this:
Create a new field of type 'HTML' on the form where you want the preformatted text.
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.
Regards,
Riya Verma
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-19-2023 05:06 AM
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