Can't put a netlify form on my Sapper.js site using the classic "netlify" attribute

Hi There!

I’m trying to have a register form and it’s not working with the “netlify” attribute. The site is built using Sapper.js


Hi @EtienneLareau - welcome to the community.

I was building out a form last night and forgot to put the name attribute on one of the inputs. It kept the whole thing from showing up in my UI.

Forms - checklist

When I went back through this checklist written by Dennis, I was able to troubleshoot. Check that out and see if you run across something.

Hi, @EtienneLareau, if it still isn’t working would you please send us a link to both the URL for page with the form and, optionally, a link to the pure HTML version of the form (if the site form is generated via javascript)?

Hi Luke !

Thanx for following up. I was able to solve the problem with… well the Netlify Doc :slight_smile: . I took the React / SSG help panel and applied the same structure to Svelte:

I’ve add to my form and it fixed it.

You guys are the best company in the world ! Keep up the good work !!

Many thanx!


Le ven. 6 déc. 2019 à 02:51, Luke Lawson via Netlify Community a écrit :

1 Like

I am having the same issue with a Sapper site and tried using the docs for SSG and added in the hidden input field, however this is not working for me. URL to site is 2020-01-18 155823

I am having the same issues Etienee. I used the docs for SSG and added the hidden input and went through all the checkboxes to make sure I had all the required things and it is still not working for me. Can you share what exactly you did to fix this?

Just got this working by also adding the hidden form to my template.html file.

1 Like

Sorry for the delay. Saturday jam :smiley:
Happy everything is working!

Thanks for sharing your solution, @bDesigned, and welcome to our Netlify community site. We appreciate you taking the time to follow-up here. :+1:

When exporting a Sapper site, I don’t think it’s necessary to add a hidden form to template.html. Following the Form Handling with Static Site Generators instructions works for me.

I think the problem with bDesigned’s form is that it has netlify netlify-honeypot="bot-field" rather than data-netlify="true" data-netlify-honeypot="bot-field".