Home > Net >  I'm learning HTML and CSS and I can't figure out how do contact forms work?
I'm learning HTML and CSS and I can't figure out how do contact forms work?

Time:01-16

I'm learning HTML and CSS and I can't figure out how do contact forms work ? Where does the e-mail address go here ? Does it need to have a php file or ?

<section  id="signup">
            <div >
                <div >
                    <div >
                        <div><span >&#128231</span></div>
                        <div >Contact</div>

                        <div >
                        <form id="form" method="POST" action="action.php"  onsubmit="submitForm(); return false;"> <!-- allows function submitForm to run when it is being submitted-->
                                <input id="n"  type="text" placeholder="NAME" required>
                                <input id="e"  type="email" placeholder="E-MAIL" required>
                                <textarea id="m"  type="text" placeholder="WRITE YOUR MESSAGE HERE" oninput='this.style.height = "";this.style.height = this.scrollHeight   "px"' required></textarea>
                                <input id="submit"  type="submit" value="SEND">
                                <div id="status"></div>
                        </form>
                        </div>
                    </div>
                </div>
            </div>
        </section>

CodePudding user response:

If you are just a beginner and not making your website be for a business, but rather just your personal website, you can use pre-built form services such as:

Formspree: https://formspree.io/

or FormSubmit: https://formsubmit.co/

For Formspree register an account first, once that is done click on the "New Form" button, and create a form (you will need to verify your account to do so), then simply fill in the rest and click "Create Form" from there you will just copy the provided form code and customize it with CSS (if you want). For FormSubmit just copy the first code which is under the "EXAMPLE FORM / CONTACT FORM" text and paste it into your editor, then customize it with CSS. You can use it's Docs (https://formsubmit.co/documentation) to add additional features to your form.

CodePudding user response:

First, you must link the form to the action.php page where your forms get stored and if it's hard to understand take some classes about it which are easily available on youtube.

  •  Tags:  
  • Related