Pode.Web
Pode.Web copied to clipboard
Radio button initial state`
Describe the Feature
The radio button component doesn't have a way to set which option is selected. This presents an issue when loading form controls based in Data retrieved during page initialization.
Also, there isn't a way so set the initial state of which option is selected.
Possible solutions would be:
Set initial state: New-PodeWebRadio -Name 'MyRadio' -Options 'Option1', 'Option2', 'Option3' -SelectedOption 'Option1'
Update state: $Id = $WebEvent.Value['id'] $Data = Get-MyData -Id $id #function to retrieve data Update-PodeWebRadio -Name 'MyRadio' -SelectedOption $Data.MyRadioOption