You are viewing limited content. For full access, please sign in.

Question

Question

Set Dropdown Value in Specify Table Row

asked on March 30, 2021

I have a table with 5 rows and 2 rows showing when the page loads. I'm using javascript to fill in the first column of the rows and I need some code to set the dropdown value of the second column to "E-mail Address" but I haven't been able to figure it out. I've tried the following code but it hasn't worked.

$('input[id="Field59(2)"]').val("E-mail Address");
$('select[id="Field59(2)"]').val("E-mail Address");
$('input[id="Field59(2)"] select').val("E-mail Address");
$("#Field59(2) select").val("E-mail Address");

0 0

Replies

replied on March 30, 2021

Hi Alex,

I've managed to set simple drop-down with 2nd line of your code

$('select[id="Field59(2)"]').val("E-mail Address");

 

For the drop-down in table, how do you populate the list? Is it from configuration, lookup rule or elsewhere?

0 0
replied on March 31, 2021

It's from configuration in the field, but I was able to set this field finally using the following code but I'm open to other ways as well.

$('select[id="Field59(2)"]').prop("selectedIndex",2);

 

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.