Submitting a form, documentation example not clear

Submitting a form, documentation example not clear

avatar
(anonymous user)
Product: PowerShell Universal
Version: 5.X


In the documentation, you’ll find

New-UDForm -Id 'form' -Content {
   New-UDTextbox -Id 'Text' -Label 'Submit Me'
} -OnSubmit {
   Show-UDToast "Hello!"
}

New-UDButton -Text "Submit Form" -OnClick {
   Invoke-UDForm -Id 'form'
}


If you run this, you’ll get:



3f0f657d97dbf53d98a009541be0047fea99e787
My question is , how do you create a form without the default Submit button that comes with the OnSubmit and how do you capture its data? Is $Eventdatain the case of your own button, still available?

I ask this because it seems impossible to disable the standard button by default.

3f0f657d97dbf53d98a009541be0047fea99e787.png

All Comments (0)