-2

I’m using the FormSubmit API. When a person fills out the form and submits it, whatever they have filled out doesn’t show and I just receive an empty form.


<section id="form-section" class="fade-contact">
        <h2 id="form-title" class="fade-contact">Get in touch</h2>
        <form action="https://formsubmit.co/8421d4ce6448fbeda493e2c8ce639a8e" method="POST" id="form">
            <!-- <input type="hidden" name="_captcha" value="false"> -->
            <!-- <input type="hidden" name="_autoresponse" value="Thank you for getting in touch!"> -->
            <div class="name-email fade-contact">
                <input type="text" name="name" placeholder="YOUR NAME" id="form-name" required>
                <input type="email" name="email" placeholder="YOUR EMAIL" id="form-email" required>
            </div>
            <input type="text" name="textarea" placeholder="YOUR MESSAGE" id="form-message" class="fade-contact" required>
            <button type="submit" class="btn submit-btn fade-contact">submit</button>
        </form>
    </section>

I corrected the name attribute to not use 2 of the same values but still it doesn’t work!

Here is an image of the formsubmitAPI website instructions

screenshot of formsubmitAPI guide

btw I hosted with netlify just incase that helps

  • You have 2 inputs with the same name "name" (one is for the user's message). Not familiar with that service, but try to fix that and see if you're still getting errors. – Will Feb 12 '22 at 03:49
  • What is the error that you are getting in this case? – Hououin Kyouma Feb 12 '22 at 03:51
  • @Ambareen, you would need to use the node server in case running locally. – Hououin Kyouma Feb 12 '22 at 03:57
  • When I do that I don't get a blank form sent to me, I get an email telling me to **change the action** … which you don't seem to have done. – Quentin Feb 12 '22 at 10:44
  • @HououinKyouma — The URL isn't a local one, and the service doesn't appear to be open source … so how could they be running it locally? – Quentin Feb 12 '22 at 10:44
  • I was able to run this locally it asked me to five permission on my mail for receiving the form data. Here this link will help, it tells you how to run the html file on the localhost. https://stackoverflow.com/questions/38497334/how-to-run-html-file-on-localhost – Hououin Kyouma Feb 12 '22 at 18:44
  • @Will I changed the messages name attribute to “textarea” but it still didn’t solve the issue – Ambareen K Feb 13 '22 at 01:09
  • @Quentin what should the action be? – Ambareen K Feb 13 '22 at 01:13
  • Whatever the email they sent you says it should be. – Quentin Feb 13 '22 at 09:23
  • @Quentin if you take a look at the picture above, I did exactly that already. It’s still giving me blank emails though :( – Ambareen K Feb 13 '22 at 16:15
  • when you submit the form it takes you to a page telling you that you need to activate it by following the instructions in the email they send to you which will tell you to replace your email address with a code in the action – Quentin Feb 13 '22 at 16:27
  • Ok I just did that, it STILL doesn’t work – Ambareen K Feb 14 '22 at 13:01

1 Answers1

0

I FIXED IT!!!!!!!

Turns out I had some JavaScript to clear the input values after submission and that was somehow affecting the form. I guess the input values were clearing before the form was submitting hence I was getting blank emails.

I just commented it out for now and will look into it later.

But…..I fixed it!! I’m so happy!

Thank you to everyone that helped