Put that at the end of your Endpint for New-UDinput. I think it should probably just do this by default but itâs just kinda been like that for along time.
Have you had a chance to look at this? I need to clear inputs on several New-UDInputFields? I am using New-UDInputAction and a content block that goes through a couple of try/catch blocks that have Show-UDToast within. I canât use New-UDInputAction -ClearInput -Toast âsome messageâ because the toast is limited compared to what you can do with Show-UDToast.
Hi @guy ok itâs in no shape or way a proper fix, but it will force the user to refresh the page, and will clear the resultsâŚwhich is using the custom component I made UniversalDashboard.UDSweetAlert its on powershell gallery and market place. I see you are using a toast, so where you got ShowUDToast change that to something like:-
New-UDInputAction -Content {New-UDSweetAlert -type success -title "Thank you $FullName" -text "You submitted the data correctly. Please press F5 after closing this message"}
As for some reason this causes the inputs to disappearâŚso this is a bug I need to look into but the bug may help you achieve what you wantâŚ? Peace
Thanks for the suggestion @psDevUK! I do love the way the UDSweetAlerts look but I would hate to rely on a bug that Iâm sure your going to squash at some point. Iâm hoping this is just something simple, and @adam can include a fix when he has time. In the meantime, I may try and see if I can use New-UDElement and Sync-UDElement to clear the inputs on my own. Thanks again @psDevUK for your input!