Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

How can i get the item of combobox in javascript LCD?

Avatar

Level 2

Hi!

I have a question about javascript in LCD i want to get or assign the item value of a combobox because i need to mapping and i´ve tried using the option

form1.Page.Contenedor.RadioBtn.rbTipo[1].caption = "nuevotexto";

form1.Page.Contenedor.RadioBtn.rbTipo[1].rawValue = "nuevotexto";

and more... but i don´t know if that is possible, could someone help me?

thank's

3 Replies

Avatar

Level 10

Hi,

I think you are trying to set the value of a radio button group(???).

If so, then you first need to look in  the Object > Binding palette to set the bound values.

Then you can set the value of the radio buttons by referencing the exclusion group and not an individual radio button.

If you have three radio buttons in an exclusion group 'RadioBtn' and they had bound values of '1', '2' and '3'. Then the following script would select the second button in the group:

form1.Page.Contenedor.RadioBtn.rawValue = "2"; 

If I have picked up your query wrong, then come back with some more info.

Niall

Avatar

Level 2

I'm sorry. I want to say, that i need to assign a name of item to radiobutton not the value i would like to change the item by javascript.

The problem is that i need to get the "caption" for each radiobutton because i need de item name for mapping, but i think it´s no possible only by javascript, it´s correct?

Thank´s

Avatar

Level 10

Hi,

Here is an example that may help: https://acrobat.com/#d=75C9rDlCajENCX315JHm*Q

You can access and change the caption of an object, as well as the rawValue. The script used in the form is JavaScript.

Hope that helps,

Niall