Support » Fixing WordPress » Form Action HTML

  • A new problem for today. I’m trying to imbed some HTML forms on a WP Page.

    <table align="center" border="0" width="75%">
    <form action="" method="POST">
    <td><input name="from_name" size="30" maxlength="100" type="text" /></td>

    However, none of the variables (there are 10, not just the one shown above) seem to work. The culprit seems to be revolving around the <form action> bit not working, since it’s not there whenever I re-edit the page.

    Is there a reason why WP seems to be removing it?

Viewing 8 replies - 1 through 8 (of 8 total)
  • Are you adding your code to the wysiwyg (visual) editor?
    You should never do that. If you want to input your own code – TURN OFF the visual (admin > Users > Your profile).

    Btter yet, for forms and other more complicated code… you should use a custom Page Template and put the code in it.
    see more: Pages.

    I’m definitely not putting it in the visual bit, I’m not that halfwit.

    I never thought of doing a custom page template, though…

    Is there any other reason why it would strip out that one line?

    I’m definitely not putting it in the visual bit, I’m not that halfwit.
    Sorry, 9 out of 10 always do it 🙂

    I don’t know why it doesn’t like the form…

    It still isn’t working.

    Anyone else have any advice?

    i am having a similar problem. i have a form on a wordpress page. the $_GET variable is the email address entered by the user. on clicking submit, the action page is called and the variable, email address should be passed but it is not. if i echo $_GET[’email’], it is blank.

    i then create a link on the same page (where the form is) with a get variable – ?email=emailAddress. when this link is clicked, the same page as per action in the form is called and the get variable passed. this time the variable is there and is displayed with the echo $_GET[’email’].

    i would very much appreciate it if someone could let me know how to ensure that the $_GET variable is passed successfully from the form.

    thanks in advance





    gets are not sent typically sent via forms, posts are. a get request would be sent in the url string, ie

    have you defined the method as a a get?


    i need to send it as a GET. yes i have defined the method as a get. i am using an htm file (which has the form) which i include in the wordpress page. the file works perfectly (the email address is sent and received by another PHP file outside of wordpress) when i use the htm file via the wordpress page, it does not work.

    i have since realised that it has something to do with the permalink structure as i set the permalink to default and it works perfectly in wordpress. i noticed that when using the permalink structure that i previously had, it would append “extra stuff” to the url. anyhow, it seems that my problem is solved – i just need to fine tune my permalinks.



    I’ve got the same problem. I found your post that helped me to solve my problem. The only difference, is I use POST method and so, the $_POST variable to retrieve successfully input data.

    So I think it could work for you, if you replace ‘method=”POST”‘ by ‘method=”GET”‘ in your form definition.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Form Action HTML’ is closed to new replies.