How to make the word appear / disappear automatically?

New Here ,
Jul 22, 2018

Copy link to clipboard

Copied

Initially, there are three text field.

If I input any word or number in field A, for example

Finally, the word " - " will be automatically appeared in field B without any input.

Similarly, If data in Field A is deleted, the word "-" will be removed automatically.

How to make the relevant code in fillable PDF? Thank you very much!

TOPICS
Acrobat SDK and JavaScript

Views

85

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

How to make the word appear / disappear automatically?

New Here ,
Jul 22, 2018

Copy link to clipboard

Copied

Initially, there are three text field.

If I input any word or number in field A, for example

Finally, the word " - " will be automatically appeared in field B without any input.

Similarly, If data in Field A is deleted, the word "-" will be removed automatically.

How to make the relevant code in fillable PDF? Thank you very much!

TOPICS
Acrobat SDK and JavaScript

Views

86

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
Jul 22, 2018 0
Most Valuable Participant ,
Jul 22, 2018

Copy link to clipboard

Copied

As the custom validation script of field A enter this code:

this.getField("B").value = (event.value=="") ? "" : "-";

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...
Jul 22, 2018 0
New Here ,
Jul 22, 2018

Copy link to clipboard

Copied

Thank you for your reply.

Do I need to add the code below?

if.....else

event.rc = false

event.value=""

Thank you very 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...
Jul 22, 2018 0
try67 LATEST
Most Valuable Participant ,
Jul 23, 2018

Copy link to clipboard

Copied

No. Use the code I provided.

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...
Jul 23, 2018 0