Last active
November 20, 2023 15:18
-
-
Save chrisfinazzo/c5b80fbe252f2908194172309e78b0c7 to your computer and use it in GitHub Desktop.
React forms scratch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from "react"; | |
const Form = () => ( | |
<form action="https://formspree.io/f/{{$url}}" method="POST"> | |
<h2 id="contact">Contact Me</h2> | |
<label htmlFor="fname">First Name</label><input type="text" className="field" name="firstname" placeholder="John" /> | |
<label htmlFor="lname">Last Name</label><input type="text" className="field" name="lastname" placeholder="Smith" /> | |
<label htmlFor="email">Email</label><input type="text" className="field" name="_replyto" placeholder="john.smith@example.com" /><label htmlFor="message">Message</label> | |
<textarea className="field" name="message" placeholder=""></textarea> | |
<input type="submit" name="submit" value="Submit" /> | |
</form> | |
) | |
export default Form; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment