<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Dropdown List choice to auto populate another dropdown in LiveCycle in Adobe Experience Manager Questions</title>
    <link>https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/dropdown-list-choice-to-auto-populate-another-dropdown-in/m-p/441736#M126152</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;LI-USER uid="14833309"&gt;&lt;/LI-USER&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This can be achieved through Java as well. But, I think the easier way is to do this through JS/CSS.&amp;nbsp;&lt;/P&gt;&lt;P&gt;For the HTML construction, just make sure that you have a data attribute for the drop-down values which we can use and map. (It can be multiple as well, just keep them comma separated)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Keep all the values in the drop-down(HTML). Keep all the values apart from the first dropdown one as (CSS)&lt;/P&gt;&lt;PRE&gt;.hide{display:none}&lt;/PRE&gt;&lt;P&gt;Now, put a listener ( on-change) on the first drop-down :&lt;/P&gt;&lt;PRE&gt;object.onchange = () =&amp;gt;{myScript};&lt;/PRE&gt;&lt;P&gt;Now, based on the value selected in the drop-down, just remove the hide class to the second level options which have matching data attributes.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Call the same function and put the same listener on all the drop-downs. And you should be able to see what you're looking for.&lt;/P&gt;</description>
    <pubDate>Tue, 22 Feb 2022 11:41:52 GMT</pubDate>
    <dc:creator>Anmol_Bhardwaj</dc:creator>
    <dc:date>2022-02-22T11:41:52Z</dc:date>
    <item>
      <title>Dropdown List choice to auto populate another dropdown in LiveCycle</title>
      <link>https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/dropdown-list-choice-to-auto-populate-another-dropdown-in/m-p/441658#M126128</link>
      <description>&lt;P&gt;I have a dropdown list with around 70 different Course Titles. Depending on which course is selected I then need it to auto populate list/s in another dropdown field. For example:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1st Dropdown = Course Selected is: 11T/0001&lt;/P&gt;&lt;P&gt;2nd Dropdown = Authority Code choice would be: AAA, BBB, CCC&lt;/P&gt;&lt;P&gt;or if&amp;nbsp;&lt;/P&gt;&lt;P&gt;1st Dropdown = Course Selected is: 11T/0002&lt;/P&gt;&lt;P&gt;2nd Dropdown = Authority Code choice would be: AAA, DDD,FFF&lt;/P&gt;&lt;P&gt;or if&lt;/P&gt;&lt;P&gt;1st Dropdown = Course Selected is: 11T/0003&lt;/P&gt;&lt;P&gt;2nd Dropdown = Authority Code choice would be: CCC, DDD,GGG,HHH&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have tried to come up with a solution using a few forums but my knowledge is limited. So far in dropdown one I already have this code on enter:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;(this.rawValue == null)&lt;BR /&gt;{&lt;BR /&gt;var arrayItems = eval(List1.value);&lt;BR /&gt;for (var i=0; i &amp;lt; arrayItems.length; i++)&lt;BR /&gt;{&lt;BR /&gt;this.addItem(arrayItems[i]);&lt;BR /&gt;}&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then in dropdown 2 I have this code on enter:&lt;/P&gt;&lt;P&gt;if ((CourseApplicationForm.Section4.CourseTitle.rawValue == "11T/0001" &amp;amp;&amp;amp; this.rawValue == null) ||&lt;BR /&gt;(CourseApplicationForm.Section4.CourseTitle.rawValue == "11T/0002)" &amp;amp;&amp;amp; this.rawValue == null))&lt;BR /&gt;{&lt;BR /&gt;var arrayItems = eval(List2_Choice_01.value);&lt;BR /&gt;for (var i=0; i &amp;lt; arrayItems.length; i++)&lt;BR /&gt;{&lt;BR /&gt;this.addItem(arrayItems[i]);&lt;BR /&gt;this.setItemState(0,1);&lt;BR /&gt;}&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;if ((CourseApplicationForm.Section4.CourseTitle.rawValue == "11T/0003" &amp;amp;&amp;amp; this.rawValue == null) ||&lt;BR /&gt;(CourseApplicationForm.Section4.CourseTitle.rawValue == "11T/0004" &amp;amp;&amp;amp; this.rawValue == null) ||&lt;BR /&gt;(CourseApplicationForm.Section4.CourseTitle.rawValue == "11T/0005" &amp;amp;&amp;amp; this.rawValue == null))&lt;BR /&gt;{&lt;BR /&gt;var arrayItems = eval(List2_Choice_02.value);&lt;BR /&gt;for (var i=0; i &amp;lt; arrayItems.length; i++)&lt;BR /&gt;{&lt;BR /&gt;this.addItem(arrayItems[i]);&lt;BR /&gt;this.setItemState(0,1);&lt;BR /&gt;}&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;if (CourseApplicationForm.Section4.CourseTitle.rawValue == "11T/0006" &amp;amp;&amp;amp; this.rawValue == null)&lt;BR /&gt;{&lt;BR /&gt;var arrayItems = eval(List2_Choice_03.value);&lt;BR /&gt;for (var i=0; i &amp;lt; arrayItems.length; i++)&lt;BR /&gt;{&lt;BR /&gt;this.addItem(arrayItems[i]);&lt;BR /&gt;this.setItemState(0,1);&lt;BR /&gt;}&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have also created the&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;variables in Form Properties. Any help would be appreciated - or if there is a better way!&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Many Thanks.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 21 Feb 2022 15:01:22 GMT</pubDate>
      <guid>https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/dropdown-list-choice-to-auto-populate-another-dropdown-in/m-p/441658#M126128</guid>
      <dc:creator>EJobling</dc:creator>
      <dc:date>2022-02-21T15:01:22Z</dc:date>
    </item>
    <item>
      <title>Re: Dropdown List choice to auto populate another dropdown in LiveCycle</title>
      <link>https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/dropdown-list-choice-to-auto-populate-another-dropdown-in/m-p/441736#M126152</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;LI-USER uid="14833309"&gt;&lt;/LI-USER&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This can be achieved through Java as well. But, I think the easier way is to do this through JS/CSS.&amp;nbsp;&lt;/P&gt;&lt;P&gt;For the HTML construction, just make sure that you have a data attribute for the drop-down values which we can use and map. (It can be multiple as well, just keep them comma separated)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Keep all the values in the drop-down(HTML). Keep all the values apart from the first dropdown one as (CSS)&lt;/P&gt;&lt;PRE&gt;.hide{display:none}&lt;/PRE&gt;&lt;P&gt;Now, put a listener ( on-change) on the first drop-down :&lt;/P&gt;&lt;PRE&gt;object.onchange = () =&amp;gt;{myScript};&lt;/PRE&gt;&lt;P&gt;Now, based on the value selected in the drop-down, just remove the hide class to the second level options which have matching data attributes.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Call the same function and put the same listener on all the drop-downs. And you should be able to see what you're looking for.&lt;/P&gt;</description>
      <pubDate>Tue, 22 Feb 2022 11:41:52 GMT</pubDate>
      <guid>https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/dropdown-list-choice-to-auto-populate-another-dropdown-in/m-p/441736#M126152</guid>
      <dc:creator>Anmol_Bhardwaj</dc:creator>
      <dc:date>2022-02-22T11:41:52Z</dc:date>
    </item>
  </channel>
</rss>

