How on earth do you re-direct after submit?

How on earth do you re-direct after submit?
0.0 0

#1

So i’m working on my portfolio page, and I get to the part where I have people fill out a form and submit it. So I use my google-fu and start coding something, only to realize that codepen doesn’t support PHP. So I started google-fu-ing some more and eventually settled on a website that let me used google sheets. Only now when one submits it takes you to a blank screen. So I searched some more and am stuck. I’ve been doing this for like a day and a half and I’m about ready to give up. Here’s my code for the form:

 <div class="form">
    <center><form id="gform" method="POST" action="https://script.google.com/macros/s/AKfycbxMUfDB2TPCeDTZ23YBgMasZrAuKXe7wPn4IOYlQUq5M-KTndA/exec">
      <input name="name" type="text" placeholder="name"></center>
    <br>
      <center><input name="e-mail" type="text" required  placeholder="e-mail address"> </center>
      <br>
      <center><textarea cols="50" rows="4" name="comment" placeholder="comment"></textarea></center>
      <br>
   <center> <button type="submit" name="redirect">Send me cat treats!</button>
    <button type="reset">Reset</button><center>
  </form>

Someone please dear god help me


#2

if you are working on your portfolio page as part of the fcc portfolio assignment … you dont have to have a working form that submits … its just to get you to design a form. Later on when you do backend you can then create a server with a database and link your form to that and store the info added to the form.


#3

Oh that makes me feel so much better. Thank you so so much!


#4

I’m working on my portfolio page as well and I thought of the same problem. How am I going to get the form to submit??? I do know a little PHP, like enough to interact with the DOM [ Document Object Model ], but not enough to set up a whole form submit in either Php or Javascript. But like JohnL3 said you don’t have to have the form working in order to complete the project.

But if you want it to work, here an easy way ;-)

There's a site called [www.formspree.io](http://www.formspree.io) where you can just go ahead and register for free with your email. Then you can put thier code right into your website, and :fireworks:you've got a working contact form. No need for php or Javascript!!! Hope this helps