Appian Community
Site
Search
Sign In/Register
Site
Search
User
DISCUSS
LEARN
SUCCESS
SUPPORT
Documentation
AppMarket
More
Cancel
I'm looking for ...
State
Not Answered
Replies
6 replies
Subscribers
8 subscribers
Views
3191 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
User Interface
I have 2 dropdowns at my form, If I select the option of the index 1 of dropdown
jmenezes
over 11 years ago
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
0
Ravichandran Thiruganasambandham (Ravi Sam)
Certified Lead Developer
over 11 years ago
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).
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
Reply
0
Ravichandran Thiruganasambandham (Ravi Sam)
Certified Lead Developer
over 11 years ago
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).
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
Children
No Data