Lock contact form on success
This commit is contained in:
@@ -37,7 +37,7 @@
|
||||
<div class="d-flex justify-content-end align-items-center">
|
||||
<div>
|
||||
<button mat-stroked-button type="button" class="me-3" (click)="reset()">Reset</button>
|
||||
<button mat-raised-button type="submit" color="primary">Send</button>
|
||||
<button mat-raised-button type="submit" color="primary" [disabled]="success">Send</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
@@ -27,6 +27,7 @@ export class ContactComponent {
|
||||
try {
|
||||
await this.momentum.api.data.create(MomentumService.SCHEMA['contact'], this.form.value);
|
||||
this.success = true;
|
||||
this.form.disable();
|
||||
} catch (error: any) {
|
||||
this.error = error.message;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user