Closed Badgerati closed 3 months ago
-ButtonType
New-PodeWebForm
New-PodeWebModal
-ShowReset
# default submit button: New-PodeWebForm -Name 'Example' -Content @() -ScriptBlock {}
New-PodeWebForm -Name 'Example' -ButtonType Submit, Reset -Content @() -ScriptBlock {}
New-PodeWebForm -Name 'Example' -ButtonType None -Content @() -ScriptBlock {}
* Modal ```powershell # default close and no scriptblock New-PodeWebModal -Name 'Example' -Content @() # default close/submit and scriptblock New-PodeWebModal -Name 'Example' -AsForm -Content @() -ScriptBlock {} # scriptblock with only submit and reset New-PodeWebModal -Name 'Example' -ButtonType Submit, Reset -AsForm -Content @() -ScriptBlock {} # scriptblock with no buttons New-PodeWebModal -Name 'Example' -ButtonType None -AsForm -Content @() -ScriptBlock {}
Description of the Change
-ButtonType
parameter ontoNew-PodeWebForm
andNew-PodeWebModal
, to allow full control over which buttons are visible.-ShowReset
onNew-PodeWebForm
.Examples
if you want a Form with a Submit and Reset button:
New-PodeWebForm -Name 'Example' -ButtonType Submit, Reset -Content @() -ScriptBlock {}
if you want a Form with just a Reset button:
New-PodeWebForm -Name 'Example' -ButtonType Submit, Reset -Content @() -ScriptBlock {}
if you want a Form with no buttons:
New-PodeWebForm -Name 'Example' -ButtonType None -Content @() -ScriptBlock {}