OutSystems UI Web - DropdownSelect - Client Side Validations not working

Hi,

We are using the component DropdownSelect from OutSystemsUI in the combo-boxes in our application. 

We need to use client-side validations for our use-case (check mandatory fields, data types, etc...). However, when the DropdownSelect component is used, the validations that would otherwise be triggered in a normal combo-box are not triggered.

In the component, we are just passing the Id of the combo-box widget. Is there any way to continue using the DropdownSelect with the client-side validations working? Is this a bug of the component?

Regards,

João Mateus

Hi João Mateus,

What version are you using? Can you show where you are using that widget?

Regards,

Hi João,

Is a limitation of the component. And I think is because the select is hidden and replaced by other stuff.

Regards,

Marcelo

Thanks for the replies,

@Marco - I'm using OutSystems 11, which is the only version that uses OutSystems UI. Previously, I would use SilkUI, which does not have this component. It has a similar one, Select2 which I believe does not have this limitation. I am using the widget alongside a normal combo-box, I just pass the Id of the combo as an input parameter. I have tested just using the combo and the client side validations worked.

@Marcelo - Yes, I was afraid that was the case. Exactly, components similar to this one (Select2) hide the select and show HTML elements that are easier to style/add functionality.

Perhaps this can be fixed in a later release of OutSystems UI.

Regards,

João Mateus

Hi João Mateus,

Thanks for the info, I could only see Select2 widget in my environment. Now I see you are referring to: https://success.outsystems.com/Documentation/11/Developing_an_Application/Design_UI/Patterns/Using_Web_Patterns/Controls/DropdownSelect

Let us know how you solved! :)

Solution

Hi,

It's bug and we have already report it to OutSystems.

Want you must do is validate it on the server for now.

So set the validation of your save button to client & server and on the server action check the form.valid

When it's false refresh the form (if you use Ajax submit) and end the save action.

Please let me know if this helps.

Cheers,

Johan

OutSystems MVP

Solution