I’m adding check-boxes programmatically into an element. I’d like to be able to query the checkbox labels and check status on submit or button click.
$chkGroups = [System.Collections.ArrayList]@();
$chkGroups.Clear()
$chkGroups.Add('DL-City-All')
$chkGroups.Add('ACL-PBX-Users')
$chkGroups.Add('DL-CityHall')
...
New-UDCard -Title "Groups" -Content {
New-UDElement -Id eGroups -Tag div -Endpoint {
Wait-Debugger
foreach ($group in $chkGroups) {
New-UDCheckbox -Label $group -Checked
}
$eGroups = Get-UDElement -Id "eGroups"
}
}
If I use the dashboard console, Get-UDElement -Id “eGroups” is indeed returning the check-boxes in a string. The Ids for the check-boxes are guids and I can’t figure out how to loop over the returned string and get at my check boxes. Also, in the above example, my variable $eGroups is allways empty.
Thanks.