Horizontal Layout is not working

Can anyone take a look at this uischema? The two elements are arranged on top of each other like there’s no horizontal layout in place.

“uischema”: {
“type”: “Group”,
“elements”: [
{
“type”: “HorizontalLayout”,
“elements”: [
{
“type”: “VerticalLayout”,
“elements”: [
{
“type”: “Control”,
“scope”: “#/properties/caseRisk”
}
]
},
{
“type”: “VerticalLayout”,
“elements”: [
{
“type”: “Control”,
“scope”: “#/properties/caseThreatType”
}
]
}
]
}
]
}

[original thread by Alexander Mahterian]

[Chad Johnson]

You only have one Control element inside your horizontal layout elements array. You probably don’t need the vertical layout entries for what you are trying to do. Try this and see if it works:

{
    "type": "Group",
    "elements": [
        {
            "type": "HorizontalLayout",
            "elements": [
                {
                    "type": "Control",
                    "scope": "#/properties/caseRisk"
                },
                {
                    "type": "Control",
                    "scope": "#/properties/caseThreatType"
                }
            ]
        }
    ]
}

@chad-johnson(chad-johnson) is right, to place elements next to each other horizontally, they must both be children of the same HorizontalLayout.