diff --git a/src/components/page-support/page-support.tsx b/src/components/page-support/page-support.tsx index 72a4cb2..786dada 100644 --- a/src/components/page-support/page-support.tsx +++ b/src/components/page-support/page-support.tsx @@ -27,7 +27,8 @@ export class PageSupport { toast.present(); } - async submit() { + async handleSubmit(e) { + e.preventDefault(); this.submitted = true; if (this.supportQuestion.valid) { @@ -42,6 +43,11 @@ export class PageSupport { } } + handleSupportQuestion(ev) { + this.supportMessage = ev.target.value; + this.supportQuestion.valid = this.supportMessage.trim().length > 0; + } + // If the user enters text in the support question and then navigates // without submitting first, ask if they meant to leave the page ionViewCanLeave() { @@ -81,11 +87,11 @@ export class PageSupport { Ionic Logo -
+ this.handleSubmit(e)}> Enter your support message below - + this.handleSupportQuestion(e)}>