New-UDForm disable submit button to prevent flooding of SQL Calls

Is there a way to disable the submit button for a few seconds prior to enabling again?
I currently have something working, not elegant, but works for the most part.

I use a session variable that stores the submit time. The -OnValidate compares this to the current time and passes a New-UDFormValidationResult -Valid or New-UDFormValidationResult -ValidationError depending if the time has passed. However, this only partially works as the way -OnValidate (understandably) works by only validating when the form changes.

I know I can display something over the form and force the user to reload the page, but wanted to know if there is another method I might not be considering?


Product: PowerShell Universal
Version: 3.1.0