I am trying to connect Netlify Forms to a form in my Angular app.
My form can be found here - https://damosull.com/contact.
Here is contact.component.html code:
<form name="contact" method="POST" data-netlify="true">
<p>
<label>Your Name: <input type="text" name="name" /></label>
</p>
<p>
<label>Your Email: <input type="email" name="email" /></label>
</p>
<p>
<label>Your Role: <select name="role[]" multiple>
<option value="leader">Leader</option>
<option value="follower">Follower</option>
</select></label>
</p>
<p>
<label>Message: <textarea name="message"></textarea></label>
</p>
<p>
<button type="submit">Send</button>
</p>
</form>
I have already enabled form detection on Netlify & can see the form on the Netlify dashboard.
However, when I try to submit some data to the form, I get the following error:
# Page Not Found
Looks like you’ve followed a broken link or entered a URL that doesn’t exist on this site.
Here is some data related to the request that is being sent:
- Request URL: Contact
- Request Method: POST
- Status Code: 404 Not Found
- Remote Address: 52.58.254.253:443
- Referrer Policy: strict-origin-when-cross-origin
Request Headers:
- :authority: damosull.com
- :method: POST
- :path: /contact
- :scheme: https
- Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,/;q=0.8,application/signed-exchange;v=b3;q=0.7
- Accept-Encoding: gzip, deflate, br, zstd
- Cache-Control: max-age=0
- Content-Length: 70
- Content-Type: application/x-www-form-urlencoded
- Cookie: PHPSESSID=6t1sss4935789qfrq0i1ppbirl
- Origin: https://damosull.com
- Referer: Contact
I read some other posts before creating this one & tried adding the following to my project, but those haven’t worked up to this point:
- Created _redirects file in src & added the following:
/* /index.html 200
- Added the following to angular.json:
"assets": [
"src/_redirects",
]
P.S. Please let me know if any other code is required, & I will share it ASAP.