Hi,
Can someone help with the below (gif) I am setting the value of a textbox with Set-UDElement and when it sets the value, it seems to just place the value over the top of the label?
Here is a snippet of the code:
New-UDForm -Content {
New-UDTextbox -Id 'sdNum' -Label 'SD Number' -Placeholder 'Enter ticket number e.g. SD-41454'
New-UDButton -Variant 'outlined' -Text 'Check SD' -OnClick {
$Value = (Get-UDElement -Id 'sdNum').value
$checkTicket = Get-JiraIssue -Key $Value -Credential $Credentials
if($checkTicket){
Show-UDToast -Message "Valid Ticket" -BackgroundColor "#FFFFFF" -MessageColor "#05a0a1" -TransitionIn bounceInRight -Position topCenter -Duration 2000
$firstName = Get-JiraIssue -Key $Value -Credential $Credentials | Select-Object customfield_12129 -ExpandProperty customfield_12129
Set-UDElement -Id 'txtfirstName' -Properties @{
Value = $firstName
}
}else {
Show-UDToast -Message "Invalid Ticket" -BackgroundColor "#FFFFFF" -MessageColor "#ff0000" -TransitionIn bounceInRight -Position topCenter -Duration 3000
}
}
New-UDRow -Columns {
New-UDColumn -SmallSize 6 -LargeSize 6 -Content {
New-UDTextbox -Id 'txtfirstName' -Label 'First Name'
}