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

Unselect all items of a list field

Community Expert ,
Oct 05, 2024 Oct 05, 2024

I tryed to unselect via javaScript all items of a list field setting "currentValueIndices" to -1 but it seems that doesn't work.

The setting works fine to indicate the selected item(s) with a number or an array, but doesn't work for unselect all of them, whereas -1 is the value returned if no items are selected...

Is there an other way to do?

Thanks

TOPICS
JavaScript , PDF , PDF forms
342
Translate
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
1 ACCEPTED SOLUTION
Community Expert ,
Oct 05, 2024 Oct 05, 2024

Reset the field:

this.resetForm(["List1"]);

View solution in original post

Translate
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 ,
Oct 05, 2024 Oct 05, 2024

Reset the field:

this.resetForm(["List1"]);

Translate
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 ,
Oct 06, 2024 Oct 06, 2024
LATEST

obviously!
Works fine, thanks.

Translate
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