WordPress.org

Ready to get started?Download WordPress

Forums

Can't get form action to post to itself (2 posts)

  1. Ben Dunkle
    Member
    Posted 3 years ago #

    I have a form on a page that submits info to itself. When it is submitted, however, it refreshes the page to the theme directory/index.php
    Let's say the form is on a page called mysite.com/survey (pretty permalinks are turned on). I want the form there to send the data to mysite.com/survey, but in my case it's sending the user to wp-content/themes/mytheme/index.php which results in an error, Fatal error: Call to undefined function language_attributes()
    What am I doing wrong? If I pass the querystring with the get method, the page works, e.g. mysite.com/survey?zip=14226
    Thanks for any help.

  2. anmari
    Member
    Posted 3 years ago #

    Hi - I have the opposite problem at the moment.

    with permalinks, form works fine with GET and POST

    with page_ids and GET, the action url is stripped and the form value is passed

    with page_ids and POST, seems to work okay, although that causes other problems for me but those are fixable.

    BUT I'd love to know why the default permalinks and GET combination fails goes to home page.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags