Netlify Forms are not working with my Nuxt App

Hi guys

I have a NuxtJS app, when I deploy it to Netlify without the netlify form html tags on my form, the app runs as expected, nothing wrong with it (apart from not loading the google fonts I have used but I’ll look into that later)

However, when I add netlify’s tags to my forms, the whole app breaks.

  • V-show’s do not work.

  • media queries I have used do not work (I’ve used (nuxt-mq - npm) to speed media queries up)

I can see lots of other people have had the same issue when trying to add netlify forms to their app but I don’t see a solid resolution anywhere and I’m unsure of what to do.

The form is required to be in the rendered files at deploy time. The problem with SPA mode is that none of your pages are actually rendered as HTML. You can check this by right clicking the page, and clicking “View Page Source”. You won’t be able to find the form.

Hi, @lewisd1996. I don’t personally know much about Nuxt … but @divya does and she has made an example repo showing how to use Nuxt to make forms at Netlify here:

This repo above was posted in a topic about Nuxt forms and I’ve linked to it below. The comments in this topic may also be helpful:

Would you please take a look at that repo and topic? If there are questions after looking at those, please let us know.

Hi there @luke, also @Ewald thank you for your replies.

It seems adding this line of code into my form has fixed it:
<input type="hidden" name="form-name" value="form-value" />

I’ll be honest as I’m sort of a newbie, I don’t quite understand why this line fixes it. I think @divya does explain in one of her comments so I should try and understand it more.

Thank you for the help guys.