I have 2 dropdowns at my form, If I select the option of the index 1 of dropdown

I have 2 dropdowns at my form, If I select the option of the index 1 of dropdown1, I want that dropdown2(that is read-only) also selects his index 1. How can I do it on Appian?...

OriginalPostID-56260

OriginalPostID-56260

  Discussion posts and replies are publicly visible

Parents
  • My earlier posts are probably not clear. What you could do, is get the index of the selected item in your dropdown 1 using onchange event (your code for that will look something like - index = document.getElementById('dd_id').selectedIndex; Now, have an hidden field on your form with the values of the second dropdown. In your JS, you can get the value of this hidden field using FormAPI.getValue. Then, you could use the valueOf function to get the value at the corresponding index in the hidden field. This value can then be set as the value of your read-only text box (note: instead of using a read-only drop down, I am suggesting a text box).
Reply
  • My earlier posts are probably not clear. What you could do, is get the index of the selected item in your dropdown 1 using onchange event (your code for that will look something like - index = document.getElementById('dd_id').selectedIndex; Now, have an hidden field on your form with the values of the second dropdown. In your JS, you can get the value of this hidden field using FormAPI.getValue. Then, you could use the valueOf function to get the value at the corresponding index in the hidden field. This value can then be set as the value of your read-only text box (note: instead of using a read-only drop down, I am suggesting a text box).
Children
No Data