Site: https://fabulous-griffin-dc0d9c.netlify.app/
Hi there,
I’ve set up a form on this site exactly the same way I’ve set it up on past sites, and I’m hitting a wall trying to figure out this 405 error. I’ve been through every other post in the forums regarding the same problem without any luck. Here’s my form code:
<form
className={styles.form}
name="contact-form"
method="POST"
data-netlify="true"
netlify-honeypot="bot-field"
action="/success"
>
<p className={styles.hidden}>
<label>
Disregard if you are human:
<input name="bot-field" />
</label>
</p>
<input type="hidden" name="form-name" value="contact-form" />
<div className={styles.inputLine}>
<div className={styles.input}>
<label for="name">Name</label>
<input type="text" id="name" name="name" />
</div>
<div className={styles.input}>
<label for="email">Email</label>
<input type="email" id="email" name="email" />
</div>
</div>
<div className={styles.inputLine}>
<div className={styles.input}>
<label for="phone">Phone</label>
<input type="tel" id="phone" name="phone" />
</div>
<div className={styles.input}>
<label for="facility">Facility</label>
<input type="text" id="facility" name="facility" />
</div>
</div>
<div className={styles.inputLine}>
<div className={styles.input}>
<label for="address">Address</label>
<input type="text" id="address" name="address" />
</div>
<div className={styles.input}>
<label for="city">City</label>
<input type="text" id="city" name="city" />
</div>
</div>
<div className={styles.stateZip}>
<div className={styles.input}>
<label for="state">State</label>
<input type="text" id="state" name="state" />
</div>
<div className={styles.input}>
<label for="zip">Zip</label>
<input type="number" id="zip" name="zip" />
</div>
</div>
<div className={styles.input}>
<label for="message">Message</label>
<textarea id="message" name="message"></textarea>
</div>
<button className={styles.button} type="submit">
SEND
</button>
</form>
Here’s the response and payload:
Request URL: https://fabulous-griffin-dc0d9c.netlify.app/success
Request Method: POST
Status Code: 405
Remote Address: 50.18.215.94:443
Referrer Policy: strict-origin-when-cross-origin
age: 0
allow: GET, HEAD
cache-control: no-cache, no-store, max-age=0, must-revalidate
content-type: text/html; charset=utf-8
date: Wed, 12 Apr 2023 22:14:40 GMT
etag: "m8yhwzd0873bg"
server: Netlify
strict-transport-security: max-age=31536000; includeSubDomains; preload
vary: Accept-Encoding
x-nf-render-mode: ssr
x-nf-request-id: 01GXVRJ0TNSPVGXRSYKQ719HFQ
x-powered-by: Next.js
:authority: fabulous-griffin-dc0d9c.netlify.app
:method: POST
:path: /
: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
accept-language: en-US,en;q=0.9
cache-control: max-age=0
content-length: 95
content-type: application/x-www-form-urlencoded
origin: https://fabulous-griffin-dc0d9c.netlify.app
referer: https://fabulous-griffin-dc0d9c.netlify.app/
sec-ch-ua: "Chromium";v="112", "Google Chrome";v="112", "Not:A-Brand";v="99"
sec-ch-ua-mobile: ?0
sec-ch-ua-platform: "macOS"
sec-fetch-dest: document
sec-fetch-mode: navigate
sec-fetch-site: same-origin
sec-fetch-user: ?1
upgrade-insecure-requests: 1
user-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/112.0.0.0 Safari/537.36
Payload:
form-name: contact-form
name: Zac
email: z*******@gmail.com
message: Testing the form!
Any help would be appreciated!
Thanks.