Recently I managed to receive form submissions using a Netlify form on my site. However, despite the submission working perfectly I get the following error in my console:
DOMException: Failed to execute ‘appendChild’ on ‘Node’: This node type does not support this method.
The error is caused 100% by the form being present on my site. Once the form is removed, the console doesn’t return this error.
Please see below that I included all required parameters in the form:
DOMException: Node.appendChild: Cannot add children to a Text
This suggests the script is attempting to add a node to text, not another node. However as there is no indication as to the location of the error within the site scripts, it is hard to offer a solution.
Hi @alexandruana, in addition to what @coelmay stated, upon inspecting your form using the Chrome Dev Tools, I see that your form has the invalid input tag below.
<input type="hidden" name="form-name" value="contact">Send us a message</input>
<input> is an empty tag, that means it’s not designed to have any content or a closing tag.
I fixed my code to include only the proper hidden input, however the error did not go away.
Noticed that in addition to the hidden input I included, there is a second one:
Not sure where this additional hidden input is coming from, but could it be the reason I am getting the javascript error? Netlify page is now updated to reflect those changes.
Hi @alexandruana, thanks for the extra feedback. There is a GitHub issue raised regarding the same error you are getting on the Nuxt.js GitHub page. Kindly visit the link below and try the suggestions there to see if it helps.
Thanks.