Flask WTForms how to prevent duplicate form submission

Solution
onClick="this.form.submit(); this.disabled=true; this.value='Saving…'; "