Support » Fixing WordPress » HTML Form POST on other domain

  • Resolved pietropoli

    (@pietropoli)


    Hi,
    I created a html form code to subscribe users to my mailing list system.
    I’ve my wordpress on http://www.domaina.it and my mailing list system on http://www.domainb.it

    Code is very simple.

    <form id="formmail" name="formmail" method="post" action="http://www.domainb.it?activationpage">
      <label for="nome">Nome</label>
      <input type="text" name="nome" id="nome" />
      <label for="email"><br />
      E-Mail</label>
      <input type="text" name="email" id="email" />
      <input name="idgroup" type="hidden" id="idgroup" value="73" />
      <input name="mailing" type="hidden" id="mailing" value="10" />
      <input name="delete" type="hidden" id="delete" value="0" />
      <input name="myurlok" type="hidden" id="myurlok" value="http://www.erbamil.it/contattaci/?nl=ok" />
      <input name="myurlerror" type="hidden" id="myurlerror" value="http://www.erbamil.it/contattaci/?nl=ko" />
      <input name="myurlcheck" type="hidden" id="myurlcheck" value="http://www.erbamil.it/contattaci/?nl=gia" />
      <input name="iscriviti alla newsletter" type="submit" value="Invia" />
    </form>

    The code display correctly my form on http://www.domaina.it, but when I click on submit button browser redirect to http://www.domainb.it?activationpage without make subscription.

    How I can use this custom html form in my wordpress?

    thanks

Viewing 4 replies - 1 through 4 (of 4 total)
  • This almost certainly has to do with the code on domainB not knowing how to handle the submission. Where did you get the HTML for the form? Is it from a specific plugin? It might be that the form action needs to be set to a processing url first.

    A form requires two parts and you can think of them as the pitcher and catcher. The pitcher, in this case, is the form html you’ve showing above. The problem is, without seeing/knowing what the catcher is expecting to see, it’s impossible to know for sure how to tell you to fix this issue.

    Thread Starter pietropoli

    (@pietropoli)

    Thank John but I tried to run the form on a website without wordpress and the same code works.

    ahh, ok.

    When you are adding the form to a page or post, are you in visual or text mode? I’m thinking it might be in visual mode. Try switching to text mode and see if that helps.

    https://dl.dropboxusercontent.com/s/eza8g1m0exoufst/2014-10-29%20at%2010.08%20AM.png?dl=0

    Thread Starter pietropoli

    (@pietropoli)

    Thanks John, the problem was cache… 🙁
    I tried today with anonymus navigation and form works… 🙂

    thank you for your support!

    pietro

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘HTML Form POST on other domain’ is closed to new replies.