
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:
- Have text field default to bullet format
- 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!
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
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.

Copy link to clipboard
Copied
That's what I feared. Thank you, though.
Copy link to clipboard
Copied
One could also use a custom format script to add the bullet point and space in front of none null fields.
// custom format script to display bullet point in front of none empty field entry;
if(event.value != "") {
event.value = "\u2022 " + event.value;
}

Copy link to clipboard
Copied
This is EXACTLY what I was looking for! Thank you!
Copy link to clipboard
Copied
Is there a way to make sure that the bulleted lists appear in a mult-line field? When I tried to preview it, the field would allow me to enter items on multiple lines, but when I tabbed to the next field, the bullet only showed up next to the first line.
Inputting information:
After tabbing to next field:
Copy link to clipboard
Copied
A bullet is just a character. So if it's entered, then it should stay where it's put. However, if you want all lines in a text field to have bullets automatically, then that is a different issue. To do this you'll need to use a Format Script on the field.
Use the Acrobat JavaScript Reference early and often
Copy link to clipboard
Copied
Great!
I don't know how to write scripts - would you be able to help me with this?
Copy link to clipboard
Copied
This is your luck day
if(event.value != "") {
event.value = event.value.split("\n").map(function(a){return "\u2022 " + a}).join("\n");
}
Use the Acrobat JavaScript Reference early and often
Copy link to clipboard
Copied
Thom! I so appreciate all of your help with this.
Unfortunately, I found that I was still having the same issue with seeing a bullet only on the first line using this script also. Do you think that perhaps there are other settings that I need to be changing to make this work? The only other change that I've made is to make this a multi-line field.
Thanks again for all of your assistance.
Copy link to clipboard
Copied
Try using the "new line" control character, "\n", in place of the "return" control character, "\r".
Be aware that this solution will bullet point empty lines or lines consisting only of spaces.
Copy link to clipboard
Copied
When I tried to plug in the "\n", it gave me a syntax error.
Perhaps I'm misreading your comment?
So sorry for all of the basic questions. I'm so thankful for those of you who have the knowledge and are willing to help!!
Copy link to clipboard
Copied
The error is because you did not include a "+" symbol after the "\n".
However, this change won't fix anything. The code is correct the way it is, and the only setting you need on the field is for it to be multiline.
Did you remove all previous code on this field?
Did you place this code in the Format Script?
It is possible that because you are on a Mac that the line ending character is not "\n", but rather "\r". try this code, it handles both cases
if(event.value != "") {
event.value = event.value.split(/[\n\r]/g).map(function(a){return "\u2022 " + a}).join("\n");
}
Use the Acrobat JavaScript Reference early and often
Copy link to clipboard
Copied
I had the same issue with Windows 10 and Acrobat Professional DC on 2 different computers.
Copy link to clipboard
Copied
I've only experienced this with external files, I've never seen Acrobat actually place a \r by itself as a line ending. Odd inconsistent behavior. I bet there is a setting for this somewhere.
Use the Acrobat JavaScript Reference early and often
Copy link to clipboard
Copied
I've only experienced this with external files, I've never seen Acrobat actually place a \r by itself as a line ending. Odd inconsistent behavior. I bet there is a setting for this somewhere.
As far as I can recall, it been that way from the beginning. It is different and platform dependent for dialog fields though.
Copy link to clipboard
Copied
When I plugged in the formula that you had given, it worked perfectly! Thank you so much!
Copy link to clipboard
Copied
A Helpful would help
Use the Acrobat JavaScript Reference early and often
Copy link to clipboard
Copied
Hello, this post was a great help. So hopefully you can help further. I changed the bullets to a numeric list with this code:
var myVar = 0;
if(event.value != "") {
event.value = event.value.split(/[\n\r]/g).map(function(a){return (myVar = myVar + 1)+") " + a}).join("\n");
}
It works, but if someone is filling out the text field and tabs out then goes back in to add more, the numbers duplicate. Example
1) 1) Response
2) New response
Is their a way to go back into the list and add additional items without duplicating the numbered list?
Thanks!
Copy link to clipboard
Copied
Yes, there are two different methods.
1) This is the easy one. Use the same code you have above with the Custom Format script. This script will modify what the user sees, not the actual text.
2) I don't know which event you are using, but lets assume it's the Validate script. This script changes the actual text, so you'll need to change your map function to recognize and existing number prefix and do a "Replace"; Like this
event.value = event.value.split(/[\n\r]/g).map(function(a){return a.replace(/^(\d{1,2}\))?/, (myVar++)+")")};).join("\n");
I didn't check this for syntax errors. It's entirely possible that there is missing parentheses
Use the Acrobat JavaScript Reference early and often
Copy link to clipboard
Copied
Really sorry if I am completely being daft buy I just cannot make this work, I have a single page form with several form fields of which I need a single field to have bullets. Its the responsibilities field
Have copied the code but can't seem to make it work, where should I be putting the script?
Copy link to clipboard
Copied
What exactly is not working? And where is the script now?
Use the Acrobat JavaScript Reference early and often
Copy link to clipboard
Copied
Ive attached 2 screenshots
The bullets dont look like bullets and they only work because I have rich text turned on
I need the bullets to have the tabbing formatted correctly
Copy link to clipboard
Copied
Scott, This should really be on another thread. The fact that it is marked as answered means it doesn't get looked at. If you are still having the issue, re-post it in a new thread.
Also look at this article/sample to find the kind of bullet you want.
https://acrobatusers.com/tutorials/using_unicode_text
Use the Acrobat JavaScript Reference early and often
Copy link to clipboard
Copied
This really helped me thanks, you see how coding is important in different aspects of life


-
- 1
- 2