Skip to content

Commit 04be551

Browse files
Fix formspree fields (#921)
* Update manifest to give more info on formspree id * Update textinput type to a valid type * Update other fields to include inputType * changeset
1 parent 7688fa2 commit 04be551

File tree

3 files changed

+16
-4
lines changed

3 files changed

+16
-4
lines changed

.changeset/loose-birds-shop.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@gitbook/integration-formspree': patch
3+
---
4+
5+
Update types in formspree integration to render email field correctly

integrations/formspree/gitbook-manifest.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ configurations:
2828
properties:
2929
formspree_id:
3030
type: string
31-
title: Formspree endpoint
32-
description: The endpoint your formspree lives at.
31+
title: Formspree ID
32+
description: The ID of your formspree form. Copy this from the settings page of your formspree form.
3333
email:
3434
type: boolean
3535
title: Email

integrations/formspree/src/index.tsx

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ const formspreeBlock = createComponent<
6464
label="Email"
6565
element={
6666
<textinput
67-
inputType="email"
67+
inputType="text"
6868
state="email"
6969
placeholder="Your email"
7070
/>
@@ -78,7 +78,13 @@ const formspreeBlock = createComponent<
7878
<box grow={1}>
7979
<input
8080
label="Name"
81-
element={<textinput state="name" placeholder="Your name" />}
81+
element={
82+
<textinput
83+
state="name"
84+
placeholder="Your name"
85+
inputType="text"
86+
/>
87+
}
8288
/>
8389
</box>
8490
) : null}
@@ -93,6 +99,7 @@ const formspreeBlock = createComponent<
9399
element={
94100
<textinput
95101
state="message"
102+
inputType="text"
96103
placeholder="Your message"
97104
multiline={true}
98105
/>

0 commit comments

Comments
 (0)