generated from netlify-templates/astro-quickstart
-
Notifications
You must be signed in to change notification settings - Fork 20
/
FeedbackForm.astro
68 lines (65 loc) · 1.44 KB
/
FeedbackForm.astro
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
---
---
<p>
Here's an example of a Netlify Form! When you fill this out, the submissions
can be found in the Netlify Admin site.
</p>
<div class="feedback-form">
<form
data-netlify="true"
netlify-honeypot
name="feedback"
method="POST"
action="/success"
>
<p class="hidden">
<label>
Don’t fill this out if you’re human: <input name="bot-field" />
</label>
</p>
<input type="hidden" name="form-name" value="feedback" />
<label for="name">Name</label>
<input id="name" type="text" name="name" />
<label for="email">Email</label>
<input id="email" type="email" name="email" required />
<label for="feedback">What is your feedback?</label>
<textarea id="feedback" wrap="soft" name="feedback" required></textarea>
<button type="submit">Submit</button>
</form>
</div>
<style>
.feedback-form {
margin: 40px 40px;
min-width: 250px;
width: 45%;
}
label {
font-size: 16px;
}
input,
textarea,
button {
border-radius: 5px;
border: 1px solid #cbd5e1;
font-size: inherit;
margin: 15px 0;
padding: 12px 20px;
width: 100%;
}
button {
background-color: #2bdcd2;
border: 1px solid #2bdcd2;
color: #1e293b;
font-size: 16px;
width: 50%;
}
.hidden {
clip: rect(0 0 0 0);
clip-path: inset(50%);
height: 1px;
overflow: hidden;
position: absolute;
white-space: nowrap;
width: 1px;
}
</style>