• I want to add a very simple html form to a page, to allow people to sign up for a newsletter. I’m using Campaign Monitor to send the newsletter and manage the subscriber list. I used CM’s utility to generate the form, which works fine when tested on a static html page.

    <form action="https://zzzzz.createsend.com/t/r/s/zzzzzz/" method="post">
    <div>
    <p><label for="name">Name:</label> <input type="text" name="cm-name" id="name" /></p>
    <p><label for="zzzzzz-zzzzzz">Email:</label> <input type="text" name="cm-zzzzzz-zzzzzz" id="zzzzzz-zzzzzz" /></p>
    
    <input type="submit" value="Subscribe" />

    However, when I add the form to a WordPress page and test it, nothing happens. Specifically, the data entered into the name and e-mail fields isn’t sent to Campaign Monitor, and instead of being redirected to CM’s standard “thank you” web page, I’m redirected to URL made up of my domain name plus a string of characters taken from the form data:

    https://mysite.net/?s=&cm-name=name&cm-zzzzzz-zzzzzz=name%40mysite.net

    I see that there is a Campaign Monitor plugin, but that would force me to use a widget and I need to have more control than that over where this little form appears, so I’d rather not use it.

    I might also note that the other forms used on the site (search forms and an e-mail form built w/ Contact 7) are working fine.

    Any ideas why WP won’t let the form data be sent to the external URL? Could the problem be that method="post" instead of “get”?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter jmps

    (@jmps)

    Just an update: It turns out the form works if I put the code in a template file, rather than in the body of a page. That’s a good enough fix, but I’m still curious why it won’t work the other way, if anyone can explain it.

    Thread Starter jmps

    (@jmps)

    A further update: Now the form is also not working from the template. Any help?

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘subscribe form problem’ is closed to new replies.