Skip to content

Commit ec8b5f9

Browse files
committed
set page value in form
1 parent f6d694f commit ec8b5f9

2 files changed

Lines changed: 3 additions & 1 deletion

File tree

src/js/08-feedback.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,8 @@
4747

4848
var action = feedbackForm.getAttribute('action') || '/'
4949

50+
feedbackFormData.append('feedback-page', action)
51+
5052
fetch(action, {
5153
method: 'POST',
5254
headers: { 'Content-Type': 'application/x-www-form-urlencoded' },

src/partials/feedback-form.hbs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<div class="feedback-section">
22
<p class="feedback-section-title">Was this page helpful?</p>
33
<form name="feedback-form" action='{{page.url}}' netlify netlify-honeypot="bot-field">
4-
<input name="feedback-page" value='{{page.url}}' hidden/>
4+
<input name="feedback-page" hidden/>
55
<div hidden>
66
<label>
77
Don't fill this out if you're human: <input name="bot-field" type="text" />

0 commit comments

Comments
 (0)