Pode.Web icon indicating copy to clipboard operation
Pode.Web copied to clipboard

Radio button initial state`

Open Clifra-Jones opened this issue 10 months ago • 0 comments

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

Clifra-Jones avatar Apr 17 '25 11:04 Clifra-Jones