mirror of
https://github.com/System-End/site.git
synced 2026-04-19 22:05:11 +00:00
form
This commit is contained in:
parent
26eb702fc8
commit
1a9c5eb480
2 changed files with 17 additions and 11 deletions
|
|
@ -51,7 +51,8 @@ const Rsvp = () => {
|
|||
},
|
||||
body: JSON.stringify({
|
||||
Name: e.target.name.value,
|
||||
Email: e.target.email.value
|
||||
Email: e.target.email.value,
|
||||
Age: e.target.age.value
|
||||
})
|
||||
})
|
||||
|
||||
|
|
@ -112,17 +113,21 @@ const Rsvp = () => {
|
|||
required
|
||||
/>
|
||||
</div>
|
||||
<div>
|
||||
<Label htmlFor="age">Under 18?</Label>
|
||||
<Input type="checkbox" name="age" id="age" checked/>
|
||||
</div>
|
||||
<Zoom delay={200}>
|
||||
<Button type="submit" sx={{ mt: [2, 0] }}>
|
||||
{submitting ? (
|
||||
<>
|
||||
<Loading />
|
||||
RSVP
|
||||
</>
|
||||
) : (
|
||||
'RSVP'
|
||||
)}
|
||||
</Button>
|
||||
<Button type="submit" sx={{ mt: [2, 0] }}>
|
||||
{submitting ? (
|
||||
<>
|
||||
<Loading />
|
||||
RSVP
|
||||
</>
|
||||
) : (
|
||||
'RSVP'
|
||||
)}
|
||||
</Button>
|
||||
</Zoom>
|
||||
</Grid>
|
||||
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@ export default async function handler(req, res) {
|
|||
const rsvp = await airtable.create({
|
||||
Name: req.body.Name,
|
||||
Email: req.body.Email,
|
||||
Age: req.body.Age,
|
||||
IP: req.headers['x-forwarded-for'] || req.socket.remoteAddress
|
||||
})
|
||||
const url = process.env.WOM_SLACK_WEBHOOK_URL
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue