Add widget on change event of combo box


I'm using a combo box inside of a form which has a set of values. Now If I select a particular option, another combo box should get added to my form. 

I'm really stuck at that for quite long. Please help me out here. Thnx in advance. 

Hi Neeraj,

Are you still stuck on this issue? Can you provide more info on what exactly you want to achieve?



The easiest thing for you in my opinion is to put the second Combo Box in the form and set its visibility to "False".

When you select that option on the action associated to your Combo Box On Change event you add an If Statement with the condition if the option you want is selected then you set the visibility of the Combo Box to "True",




Thnx for your attentions guys. But I've already resolved it by injecting JavaScript.

Neeraj Sharma wrote:

Thnx for your attentions guys. But I've already resolved it by injecting JavaScript.


careful because certain browsers or certain users may have the Javascript disabled. That may give you issues for example showing the Combo Box when you don't want or even the Combo Box not being shown at all. Have you tried disabling JavaScript while testing?


Hi Vincent,

Thnx for pointing it out but if it was so, many of outsystems plugins and widgets wouldn't work since those widgets are entirely dependent on javascript.

Thnx anyways, i'll take care of that.

Hello Neeraj,

I would like to point just that injecting JavaScript/HTML should always be avoided whenever possible, between other things because make the application more difficult to scale, to maintain, etc.

Just for future reference, the approach Vincent showed is better on those aspects.

Eduardo Jauch  

Hi Vincent and Eduardo,

Thanx for your suggestions. I'm on to making changes as suggested by vincent.