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

bonjour,

New Here ,
Sep 22, 2016 Sep 22, 2016

Bonjour,

Je cherche un script pour interdire la saisie d'un champs "textbox" si la case à cocher (radio button) précédente à retourner la valeur "non", à l'inverse, permettre la saisie du champ, si la valeur du "radio button" a été cochée "oui". Je travaille avec Acrobat DC, donc j'ai besoin d'un code Javascript.

merci !

TOPICS
Acrobat SDK and JavaScript , Windows
308
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 ,
Sep 24, 2016 Sep 24, 2016

Use this code as the MouseUp event of both radio-button fields:

var otherField = this.getField("Text1");

if (event.target.value=="yes") {

     f.readonly = false;

} else {

    f.value = "";

    f.readonly = true;

}

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
New Here ,
Sep 26, 2016 Sep 26, 2016
LATEST

Merci,

Entretemps, j'ai trouvé ce code et ça fonctionne comme voulu !

if (this.getField("vaccin1").isBoxChecked(0))

{this.getField("Text1").display=display.visible;}

else

{this.getField("Text1").display=display.hidden;}

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