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

JavaSript - Mit Auswahl eines Kontrollkästchens eine Aktion verknüpfen

Community Beginner ,
Aug 17, 2023 Aug 17, 2023

Hallo liebes Forum,

ich arbeite mit Adobe Acrobat Pro DC und hätte gerne Hilfe bei einem Problem.

Ich habe fünf Kontrollkästchen mit verschiedenen Beträgen (EUR) in meinem Formular und hätte gerne, dass mit Auswahl eines dieser Kontrollkästchen der jeweilige Betrag automatisch in ein anderes Textfeld übertragen wird. 

Bin für jede Hilfe dankbar.

TOPICS
JavaScript , PDF forms
916
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 ,
Aug 17, 2023 Aug 17, 2023

If you set (EUR) as checkbox export value, go to text field properties and under 'Calculate' tab, select 'Value is the' and pick your checkboxes.

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 ,
Aug 17, 2023 Aug 17, 2023

If you set (EUR) as checkbox export value, go to text field properties and under 'Calculate' tab, select 'Value is the' and pick your checkboxes.

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 Beginner ,
Aug 17, 2023 Aug 17, 2023

Super, es hat geklappt! Vielen lieben Dank für die schnelle Antwort

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 ,
Aug 17, 2023 Aug 17, 2023

Set the amount as the export values of each box, and then as the custom calculation script of the text field use this (let's say the check-boxes group is called "Amount1"):

 

var amount = this.getField("Amount1").valueAsString;

if (amount=="Off") event.value = "";

else event.value = amount;

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 Beginner ,
Aug 17, 2023 Aug 17, 2023
LATEST

Auch dir, danke für die Antwort.

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