Add phone number field

This commit is contained in:
Logan Hunt 2022-05-24 20:19:27 -07:00
parent 09d685c063
commit 91c2b0b4b9
Signed by untrusted user who does not match committer: simponic
GPG Key ID: 52B3774857EB24B1
2 changed files with 6 additions and 0 deletions

View File

@ -7,6 +7,7 @@
name: '',
email: '',
message: '',
phone: '',
captchaToken: '',
};
@ -109,6 +110,10 @@
<input id="name" type="text" class="form-control" bind:value={submission.name} placeholder="Johnny Appleseed" required>
</div>
</div>
<div class="form-group">
<label for="phone">Phone</label>
<input id="phone" type="text" class="form-control" bind:value={submission.phone} placeholder="(208) 123-4567">
</div>
<div class="form-group">
<label for="message">Message *</label>
<textarea id="message" class="form-control" bind:value={submission.message} rows="3" placeholder="Hello! I would like to schedule a free 15-minute consultation..." required></textarea>

View File

@ -28,6 +28,7 @@ export async function post({ request }) {
subject: `Form Submission from ${body.name}`,
text: `
Name: ${body.name}
Phone Number: ${body.phone || "Not Given"}
Email: ${body.email}
Message: ${body.message}
`,