Product: PowerShell Universal
Version: 3.7.13
I have a UDSelect that is supposed to enable some radio buttons when a selection is made, but it doesn’t seem to work
New-UDSelect -id "sel_LogonName" -Label "Select Logon User" -Option {
New-UDSelectOption -Name "Select a logon user" -Value 00
$list.username | foreach-object {
New-UDSelectOption -Name $_ -Value $_
}
} -DefaultValue 00 -OnChange {
$session:LogonUser = $EventData[0]
if ($session:logonuser -ne "00"){
Set-UDElement -id "rd_On" -properties @{disabled = $false}
Set-UDElement -id "rd_Off" -properties @{disabled = $false}
}
else {
Set-UDElement -id "rd_On" -properties @{disabled = $true}
Set-UDElement -id "rd_Off" -properties @{disabled = $true}
}
} -Disabled
new-udhtml -Markup "<br>"
New-UDRadioGroup -Content {
New-UDRadio -id "rd_On" -label "Enable Autologon" -value enable -disabled
New-UDRadio -id "rd_Off" -Label "Disable Autologon" -Value disable -disabled
}
The radio buttons never get enabled. I have a UDButton below that that will correctly enable/disable with the same settings.
Really I would like to disable the whole group rather than each individual button