Skip to Content (Press Enter)
OutSystems.com
Personal Edition
Community
Support
Training
Training
Online Training
Developer Schools
Boot Camps
Certifications
Tech Talks
Documentation
Documentation
Overview
ODC
O11
Forums
Forge
Get Involved
Get Involved
Jobs
Ideas
Members
Mentorship
User Groups
Platform
Platform
ODC
O11
Search in OutSystems
Log in
Get Started
Back to Forums
Johan den Ouden
104
Views
4
Comments
Solved
[Silk UI Web] Select2 mandatory validation fails for ListBox
Question
Forge
OutSystems UI Patterns
Silk UI Web (O11)
Forge asset by
OutSystems
Select2 is placed on ListBox.
The field has manadatory set to true
Special List:
Value 1: 0
Option 1: -
Validation on submit button: Client & Server
When the user does not select a value (so - is choosen in the listbox) the form can be submitted.
The error "Required field!" should have be shown instead and the form should not be submitted.
Note: when select2 is not applied to the listBox (so you get the normal listBox) it works fine.
Samuel Jesus
Staff
Solution
Hello Johan,
Thank you for your reply.
After looking at your eSpace, there are a couple of things I would like to mention:
You are not using a ListBox. Instead you are using a Combo-box
A ComboBox can be set as mandatory, and a LisBox does not have that option.
You are using London Theme. As I told you on the
other post
, Silk UI Patterns (including Select2) were created to be used inside Silk UI Layouts (or custom Layouts that follow the same rules of a Silk UI Layout). The usage of Silk UI Patterns on London Theme is not guaranteed. That is why you have this strange behaviour when you see it on your browser:
The same Example, implemented on the Dublin Theme, would look like this:
Please let us know if you have any questions.
Cheers,
Samuel Jesus
See solution in context
Samuel Jesus
Staff
Hello Johan,
Sorry for the late reply.
I'm not able to replicate your issue, because ListBox does not have the option to be set as mandatory.
Can you please provide a clean eSpace with your implementation?
Best Regards,
Samuel Jesus
Johan den Ouden
Hello Samuel,
Here it is. If you have any further questions please let me know.
TestForm.oml
Samuel Jesus
Staff
Solution
Hello Johan,
Thank you for your reply.
After looking at your eSpace, there are a couple of things I would like to mention:
You are not using a ListBox. Instead you are using a Combo-box
A ComboBox can be set as mandatory, and a LisBox does not have that option.
You are using London Theme. As I told you on the
other post
, Silk UI Patterns (including Select2) were created to be used inside Silk UI Layouts (or custom Layouts that follow the same rules of a Silk UI Layout). The usage of Silk UI Patterns on London Theme is not guaranteed. That is why you have this strange behaviour when you see it on your browser:
The same Example, implemented on the Dublin Theme, would look like this:
Please let us know if you have any questions.
Cheers,
Samuel Jesus
Johan den Ouden
Thanks, I have tried it with the liverpool theme and it is also working!
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
See the full guidelines
Loading...