Home > Software design >  Form action does not function properly
Form action does not function properly

Time:01-07

I'm trying to figure out why my form action URL is acting as a Relative URL instead of an Absolute URL.

I want it to go directly to ”http://www.formsubmit.co/el/cowuku” but instead it goes to github.com/project-name/”http://www.formsubmit.co/el/cowuku”

<form target="_blank" action=”http://www.formsubmit.co/el/cowuku” method="post">
        <div >
          <!-- Name -->
          <div >
            <label for="message">Name</label>
            <input  name="message" type="name" placeholder="Enter Name Here" required>
          </div>
          <!-- Email -->
          <div >
            <label for="email">Email address</label>
            <input  type="email" name="email" placeholder="Enter email" required>
          </div>
          <!-- Text Area -->
          <div >
            <label for="message">Text Area</label>
            <textarea  name="message" type="text" placeholder="Enter Text Here" required></textarea>
          </div>
          <!-- HoneyPot -->
          <input name="_formsubmit_id" type="text" style="display:none">
          <!-- Template Style -->
          <input type="hidden" name="_autoresponse" value="Thanks for your submission">
          <!-- Button Submit -->
          <input  type="submit" value="Submit Message">
        </div>
      </form>

I'm not sure what to try

CodePudding user response:

I think it is because of this ” character, it's diferent then this ". This should work

action="http://www.formsubmit.co/el/cowuku"

CodePudding user response:

Arek, target="_blank" Only works for <a> tag. The action is supposed to point to your backend file that is responsible for saving the form's data.

FormSubmit won't help you with that. So you have 2 options:

1- Create the form yourself using HTML and any backend language (PHP).
2- Delete that entire form, replace it with <a href="http://www.formsubmit.co/el/cowuku" target="_blank"/> Click here /<a> to open a new tab with the form.

Learn more about the tags and attributes from this source: https://htmlreference.io/

  • Related