Highlighted

Alphabetical bulleting in PDF multi line form fields

New Here ,
Sep 10, 2020

Copy link to clipboard

Copied

Hello,

 

I am currently attempting to use this Custom Format Script

 

var myVar = 0;

if(event.value != "") {

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

}

 

in order to have a multi line form field appear like the following:

 

1) Sentence 1

2) Sentence 2

3) Sentence 3

4) Sentence 4

 

However, this specific application requires that the numbered bullets be alphabetical characters instead of numbers, i.e. A = 1, B = 2 or (A + 1), C = 3 or (A + 2)

 

Is this possible to do? I retreived this function from this thread https://community.adobe.com/t5/acrobat/creating-bullets-in-text-fields/td-p/9480892?page=1

 

Thank you in advance for any assistance!

Most Valuable Participant
Correct answer by try67 | Most Valuable Participant

Use this:

 

var myVar = 0;

if(event.value != "") {

event.value = event.value.split(/[\n\r]/g).map(function(a){myVar = myVar + 1; return String.fromCharCode(64+myVar)+") " + a}).join("\n");

}

 

Keep in mind it will go wrong once you reach "Z", though...

TOPICS
PDF forms

Views

39

Likes

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

Alphabetical bulleting in PDF multi line form fields

New Here ,
Sep 10, 2020

Copy link to clipboard

Copied

Hello,

 

I am currently attempting to use this Custom Format Script

 

var myVar = 0;

if(event.value != "") {

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

}

 

in order to have a multi line form field appear like the following:

 

1) Sentence 1

2) Sentence 2

3) Sentence 3

4) Sentence 4

 

However, this specific application requires that the numbered bullets be alphabetical characters instead of numbers, i.e. A = 1, B = 2 or (A + 1), C = 3 or (A + 2)

 

Is this possible to do? I retreived this function from this thread https://community.adobe.com/t5/acrobat/creating-bullets-in-text-fields/td-p/9480892?page=1

 

Thank you in advance for any assistance!

Most Valuable Participant
Correct answer by try67 | Most Valuable Participant

Use this:

 

var myVar = 0;

if(event.value != "") {

event.value = event.value.split(/[\n\r]/g).map(function(a){myVar = myVar + 1; return String.fromCharCode(64+myVar)+") " + a}).join("\n");

}

 

Keep in mind it will go wrong once you reach "Z", though...

TOPICS
PDF forms

Views

40

Likes

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
Sep 10, 2020 0
Most Valuable Participant ,
Sep 10, 2020

Copy link to clipboard

Copied

Use this:

 

var myVar = 0;

if(event.value != "") {

event.value = event.value.split(/[\n\r]/g).map(function(a){myVar = myVar + 1; return String.fromCharCode(64+myVar)+") " + a}).join("\n");

}

 

Keep in mind it will go wrong once you reach "Z", though...

Likes

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
Reply
Loading...
Sep 10, 2020 0
New Here ,
Sep 10, 2020

Copy link to clipboard

Copied

This works perfectly! I do not expect the list to exceed 26 chars, so this has been solved.

 

Thank you so much!

Likes

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
Reply
Loading...
Sep 10, 2020 0