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

159

Likes

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

Most Valuable Participant , Dec 13, 2018 Dec 13, 2018
The code I provided will do that.

Likes

Translate

Translate
Most Valuable Participant ,
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

Likes

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

Likes

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

Copy link to clipboard

Copied

The code I provided will do that.

Likes

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

Likes

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