Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Custom script for bulleted lists?

New Here ,
Apr 08, 2019 Apr 08, 2019

Is there a custom script I can use to make a given form field appear as a bulleted list when the user enters it in paragraph form?

TOPICS
PDF forms
2.2K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
1 ACCEPTED SOLUTION
Community Expert ,
Apr 08, 2019 Apr 08, 2019

You can use this code as the field's custom Keystroke script:

if (event.change=="\n") event.change+="\u2022\t";

And this as its On Focus script:

if (event.target.value=="") event.target.value="\u2022\t";

However, when first entering it the caret will appear before the bullet (and tab), not after it. I don't see a way around that at the moment.

View solution in original post

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Apr 08, 2019 Apr 08, 2019

A script can be used to automatically add a bullet after each new line in a multi-line text field, if that's what you mean.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Apr 08, 2019 Apr 08, 2019

Yes, that's exactly what I'm looking for, although it would be helpful if it added a bullet at the beginning of each line, instead of after a new line, since I want the first line to be bulleted as well.

So, where would I find such a script? I'm a scripting newbie and so far have only used scripts that I've found posted online. I have no idea how to write scripts myself.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Apr 08, 2019 Apr 08, 2019

You can use this code as the field's custom Keystroke script:

if (event.change=="\n") event.change+="\u2022\t";

And this as its On Focus script:

if (event.target.value=="") event.target.value="\u2022\t";

However, when first entering it the caret will appear before the bullet (and tab), not after it. I don't see a way around that at the moment.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Apr 08, 2019 Apr 08, 2019
LATEST

That is hugely helpful. Thank you so much!

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines