Hi folks
I am trying to create a small tool to update or add records to SQLite database (for a front page dashboard that consists of tiles acting as bookmarks)
I, for the life of me, can’t figure out how to read value from a New-UDTextbox that’s within a grid.
Here’s an example code that represents the problem, any ideas?
New-UDPage -Name 'dashboard_variables' -Endpoint {
New-UDGrid -Title "Test" -Headers @("text","btn") -Properties @("text","btn") -Endpoint {
@(
[PSCustomObject]@{
text = New-UDTextbox -Id "testText" -Value "READ THIS"
btn = New-UDButton -Text "Get text" -OnClick {
Show-UDToast -Message (Get-UDElement -Id "testText").Attributes['value'] -Duration 3000
}
}
) | Out-UDGridData
} -FontColor white -BackgroundColor "#4D215732" -NoExport -NoPaging
}