Support » Plugin: Contact Form 7 » [Plugin: Contact Form 7] Redirecting Contact form

  • Resolved nkamp



    I have read the FAQ on contact form 7 about this subject but it doesn’t fix my issue.

    I have problems with the redirecting of the contact form. I think I know why, but not know how to solve it.

    <form class=”wpcf7-form” method=”post” action=”/?page_id=193#wpcf7-f200-p193-o1″>

    The action is not filled in right? Does anybody know what the cause is of this issue?
    I’m using the GLEAM theme of Elegant themes.

    I’ve added the next line to additional settings:
    on_sent_ok: “location.replace(‘’);”

    I’ve added the next line to the page.php:
    <?php wp_footer(); ?>

    So what is left? Can anybody explain or help me what to do next?


Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Author Takayuki Miyoshi


    By the way, the ‘standard’ contact form is working fine. The problem I have is with the new contact form, order form.
    Look here try it:!/?page_id=193

    I don’t think that the action is filled in right! It should something like this:
    <form class=”wpcf7-form” method=”post” action=”″>

    in stead of:
    <form class=”wpcf7-form” method=”post” action=”/?page_id=193#wpcf7-f200-p193-o1″>

    There is no url filled in, and the browser is redirect to yeh to what?
    Why is this #wpcf7-f200-p193-o1 added?

    And same problem exist if one of the required fields is not filled in correctly.

    I thought I have found the solution at , but unfortunately not yet!

    But what also not understand is, the contact form just works fine. When you press submit to stay on the page and the message “thank you for you’re …”, it works al fine.

    Now I have “add new” done and why is not working as the ‘standard’ contact form? And I see so lot of people who are asking for the solution but it doesn’t work in my situation.

    I am novice at WP. How do i change forwarding email address that is currently embedded into contact us form 7? Basically, i do NOT know which files it is coming from, as i looked up through WP/Admin plugin and i cannot find forwarding address. Would appreciate your help.
    Thanks. Tom

    I think more or less how it is working and why not.
    The thing is when you install CF7 you have a standard contact form installed. If you embed this in a page, it is working fine. And after submit I see now it is staying on the same page but the fields are dissapeared and replaced by “Thank you for contacting us”.
    This is because due of a anchor, I think. Correct me if I’m wrong.

    Now I have by “Add new” created a new contact form with custom fields. This working fine so far. But if I click on Send, or not all required fields are filled in then it goes wrong.
    In the action I see this:
    <form class=”wpcf7-form” method=”post” action=”/?page_id=193#wpcf7-f200-p193-o1″>

    I thought this is wrong.
    Now I understand that this is a #wpcf7-f200-p193-o1 anchor. And I think this is missing on the custom created contact form! Or something else is missing here

    But why is this anchor on the original contact form and not on the custom contact form?
    Can someone give a advise, because I think how to solve this? I think I have to change some code or…
    AND also for the case that the user has not filled in all the required fields. I think this solved with a anchor as well.



    I have a from here:

    I have a re-direct embedded: on_sent_ok: “location = ‘’;”

    It has been working fine for months.

    Then I’ve added another form here:

    With a redirect: on_sent_ok: “location = ‘’;”

    But this form WILL NOT redirect. I can’t figure out why.

    Even in a test, I have copied the first form’s redirect only it won’t work either! Very weird.


    I have a cf7 form that works fine, but after submission, it goes to the middle of the form just submitted, can’t see the ‘thank you’ message that it was sent ok. Visitors will be confused trying to figure out if it was sent or not. The anchor #etc is in the action URL is fine. Not sure why? Any ideas? Thanks!

    Attempted to redirect to another page after successful submission in the meantime, and that doesn’t work at all. Used the
    on_sent_ok: “location = ‘URLhere’;”
    in the additional settings, but doesn’t redirect after submission. Hmmmmmmmm…..

    Thanks all for the reaction.

    Yes, I have tried that solution as well. And I have seen another solution by adding the phrase “<script> href.locate….</script> to put this behind the text “thank you…”.

    My standard contact form was working well, but I had also created an own one with additional fields. And this one gives the problem. Also in my case an “anchor” was not working.

    BUT in my case I had bought the GLEAM theme which is a nice theme, but is not compatible with a (lot) of wordpress plugins! That is confirmed by Elegant themes… So it’s a pitty.

    I think I’m having the same issues. I’m using the Chameleon Theme by Elegant themes, and I’ve noticed that the on_sent_ok: redirect doesn’t work on any of the Chameleon templates, but it does work on my “auctions” page (which is a template of prospress). So it seems to be a theme conflict. Any ideas? Thanks!

    I have been changing to another theme and build a new layout. But with this theme I had problems as well.
    For example I have installed the new theme. I want to look back to the GLEAM by activating it again, but the menu was not working anymore!!??? (javascript error) So my new theme is affecting the other theme’s.
    I have tried to get the webshop working with the e-shop plugin. But I couldn’t get it working… I’m not sure but I’m doubting if this plugin is working 100%.

    So I have leave it now, and have made a order form. The customer is satified now.

    For me this topic can be closed.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘[Plugin: Contact Form 7] Redirecting Contact form’ is closed to new replies.