この会話は、活動がないためロックされています。新しい投稿を作成してください。
この会話は、活動がないためロックされています。新しい投稿を作成してください。
Hi,
currently dropdownshowhide.js is able to perform hide and show field/fields based on the dropdown selection.
I have requirement like below:
I have two dropdowns lets say dp1&dp2.
so if dp1 is selected option1 then I want to show a,b,c options in dp2(hide d,e,f)
And similarly dp1 is selected option2 then I want to show d,e,f options in dp2(hide a,b,c)
How can I achieve the above let me know if anyone come across the situation similar to this. Thanks in advance
@arunpatidar @Theo_Pendle @VeenaVikraman
解決済! 解決策の投稿を見る。
トピックはコミュニティのコンテンツの分類に役立ち、関連コンテンツを発見する可能性を広げます。
表示
返信
いいね!の合計
Hi @srikanthg212933,
I answered a similar question recently. For your specific case I think the best option that will be simplest and require least maintenance is the following: Modify the content of dp2 in the front end. This is the quickest solution. Follow this tutorial to design a simple framework for dynamically modifying TouchUI dialogs: AEM: Conditionally show or hide a field based on a Checkbox widget (or anything else). The tutorial doesn't use your exact use case, but it doesn't have to because it's easily extensible 🙂
@Vish_dhaliwal also shared a useful previous answer which modified the content of dropdown by making changes in the datasource in the back end. The problem with this is that you still need front-end code to make it work. If you needed some kind of backend validation, or if the values in dp2 are truly dynamic (ie: they changed based on which user is logged, the day of the week etc.) then manipulating the datasource would make sense but it doesn't seem like that's your use-case. If you chose to go that route anyways, here is a tutorial to create a generic framework for building datasource (you can probably tell by now that I like extensible frameworks 😂 AEM: Populate a drop-down with a data source
Let me know if that helps! 🙂
Please review post: https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/dynamically-populate-selec...
Hope this helps!
表示
返信
いいね!の合計
Hi @srikanthg212933,
I answered a similar question recently. For your specific case I think the best option that will be simplest and require least maintenance is the following: Modify the content of dp2 in the front end. This is the quickest solution. Follow this tutorial to design a simple framework for dynamically modifying TouchUI dialogs: AEM: Conditionally show or hide a field based on a Checkbox widget (or anything else). The tutorial doesn't use your exact use case, but it doesn't have to because it's easily extensible 🙂
@Vish_dhaliwal also shared a useful previous answer which modified the content of dropdown by making changes in the datasource in the back end. The problem with this is that you still need front-end code to make it work. If you needed some kind of backend validation, or if the values in dp2 are truly dynamic (ie: they changed based on which user is logged, the day of the week etc.) then manipulating the datasource would make sense but it doesn't seem like that's your use-case. If you chose to go that route anyways, here is a tutorial to create a generic framework for building datasource (you can probably tell by now that I like extensible frameworks 😂 AEM: Populate a drop-down with a data source
Let me know if that helps! 🙂
any references
表示
返信
いいね!の合計
I am able to do it with one extra hidden field to preserve in between values and a servlet to deliver options along with some java script logic which handles ajax with on select events. bit of effort but worth.
表示
返信
いいね!の合計
yes youre right!! but I don't find it easy hiding specific drop down options in a dropdown using js (instead delivering options from data source looks more easy as a java guy ;-))
表示
返信
いいね!の合計