Can't enable a radio button/Other bugs found

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


Here is a video of what is happening. The button enables, but the radio buttons do not.

Found another issue in the same dashboard. When using OnEnter with a textbox it can’t find the button just below it. Also there is a typo in the error message that appears.

 New-UDTextbox -id "tb_Hostname" -Label "Hostname" -OnEnter {
            Invoke-UDEndpoint -id "btn_Get"
        new-udhtml -Markup "<br>"
        New-UDButton -id "btn_Get" -Text "Get computers" -OnClick {


Used the docs here for the OnEnter block


This was solved, the $body is a json value

Found another issue with the radio buttons

New-UDRadioGroup -id "rdgp_OnOff" -Content {
            New-UDRadio -id "rd_On" -label "Enable Autologon" -value On
            New-UDRadio -id "rd_Off" -Label "Disable Autologon" -Value Off
        } -OnChange {            
            $session:enable = $body
            Show-UDToast -Message $Body

The value of the selection is always wrapped in quotation marks no matter what I set the value to. $session:enable, when called later, will be “On” or “Off” even if I do not have the quotation marks in the value parameter


i think the $body is JSON and convertfrom-json could then remove the quotation marks :wink:

Yes! It was json, just wasn’t in the docs saying it needed to be converted.