Last active
September 30, 2020 14:31
-
-
Save vorpal56/18e3b746c984eccb32ff10b91cae2e33 to your computer and use it in GitHub Desktop.
Contact form without a server using Angular - contact.component.html without Material
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<form class="contact" [formGroup]="form" method="post" (ngSubmit)="onSubmit()"> | |
Name | |
<input [formControl]="name" required> | |
<input [formControl]="email" placeholder="email@example.com" required> | |
Message | |
<textarea [formControl]="message" maxlength="256" placeholder="I'm interested in..." required></textarea> | |
<button [disabled]="isLoading" class="submit" type="submit">Submit</button> | |
<input [formControl]="honeypot" class="hidden" type="text" /> | |
<div [ngClass]="!submitted? 'hidden' : 'visible'" class="center-text"> | |
<span>{{responseMessage}}</span> | |
</div> | |
</form> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment