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

Remove Field Event with JavaScript

Engaged ,
Mar 26, 2020 Mar 26, 2020

Copy link to clipboard

Copied

Is it possible to remove an event from a field with JavaScript?

I used the setAction(); method to create OnFocus and OnBlur events on an array of fields to create an auto text size attribute, but there are some use cases of the form that require the event to be removed. The code is a doc level function and triggered by a combobox.

I wasn't able to find any documentation in the SDK for my issue.

I was able to get it to work the way I wanted by making the events blank based on combobox selection such as (fieldName.setAction("OnFocus", " ");), but I feel that's more of a workaround. Is there a better solution?

TOPICS
Acrobat SDK and JavaScript

Views

1.7K

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

Community Expert , Mar 26, 2020 Mar 26, 2020

No.

Votes

Translate

Translate
Community Expert ,
Mar 26, 2020 Mar 26, 2020

Copy link to clipboard

Copied

No.

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
Engaged ,
Mar 26, 2020 Mar 26, 2020

Copy link to clipboard

Copied

Thanks for the info!

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

Copy link to clipboard

Copied

Does this PDF have to work with Reader? Changing the document with setAction is fine for creating the form, but not when using it, and it won't work with Reader.

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
Engaged ,
Mar 26, 2020 Mar 26, 2020

Copy link to clipboard

Copied

It does. I just tested it with Reader and didn't have an issue.

The form is for Avery Labels and consists of a cover page that will spawn page templates based on combo selection. The selection choice will also change the content of the OnFocus and OnBlur events.

It's an internal form, so this test is based on the latest version of Reader.

I've never really been keen on designing for compatibility when the software is free.

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

Copy link to clipboard

Copied

LATEST

Yes, the documentation is incorrect about this. This method does work in Reader (at least XI, didn't test it in DC).

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