Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions src/components/feedback-form.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const additionalFormAttr = {
name: "feedback",
method: "post",
"data-netlify": "true",
"data-netlify-honeypot": "bot-field"
"netlify-honeypot": "bot-field"
};

function FeedbackForm() {
Expand All @@ -30,6 +30,7 @@ function FeedbackForm() {
className="feedback__input"
placeholder={t("feedback.hello-fsn")}
type="text"
required
/>
<label htmlFor="thoughts" className="feedback__label">
{t("your-thoughts")}
Expand All @@ -40,7 +41,7 @@ function FeedbackForm() {
className="feedback__input"
placeholder={t("feedback.it-would-be-awesome-if")}
rows="5"
type="text"
required
/>
</Form>
);
Expand Down
2 changes: 1 addition & 1 deletion src/components/netlify-honeypot.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ function NetlifyHoneypot({ formName }) {
<p className="hidden">
<label>
{t("submission.bot-field")}
<input name="bot-field" />
<input name="bot-field" type="text" />
</label>
</p>
</>
Expand Down
5 changes: 3 additions & 2 deletions src/components/submission-form.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,8 @@ function SubmissionForm() {

fetch("/", {
method: "POST",
body: new URLSearchParams(new FormData(event.target))
headers: { "Content-Type": "application/x-www-form-urlencoded" },
body: new URLSearchParams(new FormData(event.target)).toString()
})
.then((response) => {
if (!response.ok) throw new Error(response.statusText);
Expand Down Expand Up @@ -90,7 +91,7 @@ function SubmissionForm() {
name={FORM_NAME}
method="post"
data-netlify="true"
data-netlify-honeypot="bot-field"
netlify-honeypot="bot-field"
onSubmit={handleSubmit}
className="flex flex-col rounded shadow bg-white w-full mb-4 p-6 lg:w-1/2"
>
Expand Down
Loading