Badgerati / Pode.Web

Web template framework for use with the Pode PowerShell web server
MIT License
191 stars 25 forks source link

Update Checkbox Value #438

Open kanichrnd opened 1 year ago

kanichrnd commented 1 year ago

Hello,

I'm struggling to find a way to update the values of Checkboxes like it was made for Update-PodeWebSelect

I've tried to use "New-PodeWebSelect -Multiple" instead of checkboxes, but multiple selection is not so simple especially if you try to do this from Smartphone browser.

So, my question is: is there any options to update values (and amount of them) of New-PodeWebCheckbox with Button or Click Events?

Thank you in advance!

phdavis commented 1 year ago

You should be able to use Update-PodeWebCheckbox

kanichrnd commented 1 year ago

You should be able to use Update-PodeWebCheckbox

I've tried to, but as per documentation, Update-PodeWebCheckbox can only update checkbox state, like enabled/disabled, checked/unchecked:

Update-PodeWebCheckbox -Id <String> [-OptionId <Int32>] [-State <String>] [-Checked] [<CommonParameters>]

Badgerati commented 1 year ago

There isn't a way to do this currently, but adding -Value support for Update-PodeWebCheckbox should be possible :)

DanGough commented 1 year ago

I would very much like this also. Currently using a multiple select, but the user experience is not great as you have to educate them to hold CTRL for multiple selections, and one stray click can reset your selection.