Expand my Community achievements bar.

Radically easy to access on brand approved content for distribution and omnichannel performant delivery. AEM Assets Content Hub and Dynamic Media with OpenAPI capabilities is now GA.

Can a Drop Down List (DDL) have a different functions ?

Avatar

Former Community Member

Hello,

Can a DDL field do 2 different functions depend the user selection from radio buttons?

For Example:

1)  If the user select radio button A which allow the user to manually fill the form for new employee. in this case, the DDL will allow the user to pick/select choice from the DDL list.

2)  If the user select radio button B which allow the user to automatically execute web service for existing employee to populate data for the form including DDL above since the DDL is the same field as above in #1.

Please advise if it is possible and explain how it can be done.

Thanks,

Han Dao

5 Replies

Avatar

Level 10

You can achieve both. The code to execute different functions should be written in the click event of the Radio Buttons rather than in the Dropdown events.

Thanks

Srini

Avatar

Former Community Member

Hi Srini,

Do you have an example code, can you please share as well? I have the code to execute the web service in the one of the text field, do I need make any change to it?

Thanks,

Han Dao

Avatar

Level 10

The attached sample might give you some idea to proceed. Let me know if you need more help.

https://acrobat.com/#d=9OQ*ZJx-ITuDH4y4KBHR0Q

Thanks

Srini

Avatar

Former Community Member

Hi Srini,

Thanks for the sample. I think I got it works now by moving the clearItems to the Exit event where it execute the web services.

Thanks again,

Han Dao

Avatar

Level 10

Glad you got it.. I was planning to send you the source code since you were not able to open the file.

Thanks

Srini