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

radio button - adobe acrobat

Explorer ,
Dec 13, 2018 Dec 13, 2018

Copy link to clipboard

Copied

Hola

Tengo varios radio button y me gustaría poder activarles por JavaScript.

selecciono cualquier provincia y me gustaría que automáticamente  el radio button quedase marcado, activado.

un saludo y muchas gracias.

TOPICS
Acrobat SDK and JavaScript , Windows

Views

518

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 , Dec 13, 2018 Dec 13, 2018

The code I provided will do that.

Votes

Translate

Translate
Community Expert ,
Dec 13, 2018 Dec 13, 2018

Copy link to clipboard

Copied

You can tick a specific radio button by setting the field's value to its "Radio button choice".
For example, if the value is "1" and the name of the field is "RadioButton1", you can do it like this:

this.getField("RadioButton1").value = "1";

To make it dependent on the value of the drop-down you can use the following as the custom validation script of the drop-down field:

if (event.value=="AVILA") this.getField("RadioButton1").value = "1";

else if (event.value=="MADRID") this.getField("RadioButton1").value = "2";

else if (event.value=="TOLEDO") this.getField("RadioButton1").value = "3";

else this.getField("RadioButton1").value = "Off"; // the default value when nothing is selected

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
Explorer ,
Dec 13, 2018 Dec 13, 2018

Copy link to clipboard

Copied

hola

muchas gracias por la ayuda tan rápida.

pero la idea es mas simple.

solo quiero que se marque el botón como activo

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 ,
Dec 13, 2018 Dec 13, 2018

Copy link to clipboard

Copied

The code I provided will do that.

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
Explorer ,
Dec 13, 2018 Dec 13, 2018

Copy link to clipboard

Copied

LATEST

hola

Tenía razón

muy amable

Feliz Navidad y Próspero Año Nuevo

Muchísimas Gracias

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