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:
I am finding a lot of forums on how to create bullets, but none of them are in a text field.
Thank you!
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
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:
This is how I need it to be:
my code looks like this :
if(NAME.rawValue == 'LINES_DIS') {
this.rawValue = "\u002D " + this.rawValue;
}
Thank you for any advice.
Copy link to clipboard
Copied
That's nearly impossible, unless you use a fixed-width font.
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..
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.
Copy link to clipboard
Copied
You really aught to be doing this on a new thread.
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");
}
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");
}
Copy link to clipboard
Copied
Using this script, is there a way to put a space between the bullet and the text?
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");
}
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.
Copy link to clipboard
Copied
Thanks for this but how can I add to Adobe InDesign?
Copy link to clipboard
Copied
Try the forum for Adobe InDesign.
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.