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

Creating Bullets in Text Fields

Guest
Nov 15, 2017 Nov 15, 2017

Copy link to clipboard

Copied

My office has Adobe Acrobat Pro DC.  I have created a 3-page form that contains several text fields.  Some of these fields require entries in bullet format.

Other than cutting and pasting from MS Word, is there a way to:

  1. Have text field default to bullet format
  2. Create bullets in a text field

I am finding a lot of forums on how to create bullets, but none of them are in a text field.

Thank you!

TOPICS
PDF forms

Views

31.8K

Translate

Translate

Report

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

correct answers 1 Correct answer

LEGEND , Nov 15, 2017 Nov 15, 2017

Within PDF form field types there is no bullet point option.

You can use the <Alt> + <Numeric Keypad Keys>0149 to add a bullet point. Or you can cut and paste from the CharMap utility.

Votes

Translate

Translate
New Here ,
Nov 13, 2019 Nov 13, 2019

Copy link to clipboard

Copied

Hello Thom! I would like to ask you something similar, so hopefully you are still watching this conversation. I have problem with indentation - if text is longer than single row I would like to allign text with bullets. Is it somehow possible to manage this with javascript?

This is how it looks now:

paragraph.png

This is how I need it to be:

  • text
  • text longer than one row text longer than one row text longer than one row text longer than one row text longer than one row text longer than one row

 

my code looks like this :

if(NAME.rawValue == 'LINES_DIS') {

this.rawValue = "\u002D " + this.rawValue;

}

 

Thank you for any advice.

Votes

Translate

Translate

Report

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 ,
Nov 13, 2019 Nov 13, 2019

Copy link to clipboard

Copied

That's nearly impossible, unless you use a fixed-width font.

Votes

Translate

Translate

Report

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 ,
Nov 13, 2019 Nov 13, 2019

Copy link to clipboard

Copied

So "nearly impossible" means, that there is a chance? 🙂 could you give me some hint please? 

Also, do you have any idea why I cannot use this option? That would be the bestand easiest solution..

paragraph2.png

Votes

Translate

Translate

Report

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 ,
Nov 13, 2019 Nov 13, 2019

Copy link to clipboard

Copied

You would need to write a function that calculates the length of the text and compare it to the width of the box. In order to do that you would need to create a table with the width of each character, which will depend on the font and font size. When the length of the text equals to (or is bigger than) the length of the field then you would need to insert a line-break and a tab (or some spaces) into it.

 

I can't help you with the details of how to do that, though, since it seems you're using LiveCycle Designer, and I only write code for Acrobat forms.

Votes

Translate

Translate

Report

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 ,
Nov 13, 2019 Nov 13, 2019

Copy link to clipboard

Copied

You really aught to be doing this on a new thread.

Thom Parker - Software Developer at PDFScripting
Use the Acrobat JavaScript Reference early and often

Votes

Translate

Translate

Report

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 ,
Jun 08, 2021 Jun 08, 2021

Copy link to clipboard

Copied

I improved on this a bit to account for variances in systems.  This should work the same regardless of newline or carriage return

 

if(event.value != "") {

event.value = event.value.split(/[\r, \n]/).map(function(a){return "\u2022 " + a}).join("\n");

}

Votes

Translate

Translate

Report

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 ,
Jun 08, 2021 Jun 08, 2021

Copy link to clipboard

Copied

wow...you can't edit your post??

 

above had a bug. *this* should account for multiple systems and line break types

 

if(event.value != "") {
event.value = event.value.split(/\r|\n/).map(function(a){return "\u2022 " + a}).join("\n");
}

Votes

Translate

Translate

Report

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 ,
Aug 03, 2021 Aug 03, 2021

Copy link to clipboard

Copied

Using this script, is there a way to put a space between the bullet and the text?

Votes

Translate

Translate

Report

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 ,
Aug 04, 2021 Aug 04, 2021

Copy link to clipboard

Copied

The last code that was posted already puts a space after the bullet. However, you an add more spaces by just putting them in the bullet string, like this.

 

if(event.value != "") {
event.value = event.value.split(/\r|\n/).map(function(a){return "\u2022      " + a}).join("\n");
}

Thom Parker - Software Developer at PDFScripting
Use the Acrobat JavaScript Reference early and often

Votes

Translate

Translate

Report

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
LEGEND ,
Jan 09, 2018 Jan 09, 2018

Copy link to clipboard

Copied

The OP asked how to prefix the value of a text field with a bullet point. That is what the script does. If the field is not empty it prefixes a bullet point symbol to the value entered into the field. For a multi-line field, the entire entry into the field is the value of the field. including the new lines.

If you want this to be for each new line, then more scripting will be needed and it may require testing for blank lines so the bullet point is not added to the blank lines.

Votes

Translate

Translate

Report

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 Beginner ,
Mar 09, 2020 Mar 09, 2020

Copy link to clipboard

Copied

Thanks for this but how can I add to Adobe InDesign?

Votes

Translate

Translate

Report

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 ,
Mar 09, 2020 Mar 09, 2020

Copy link to clipboard

Copied

Try the forum for Adobe InDesign.

Votes

Translate

Translate

Report

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 ,
Mar 09, 2020 Mar 09, 2020

Copy link to clipboard

Copied

"Thanks for this but how can I add to Adobe InDesign?"

You cannot add a JavaScript in a form field with InDesign, this requires Acrobat Pro.

Votes

Translate

Translate

Report

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