4

I am using EE 2.4

Dummy signup: http://tensports.zeecdn.com/test-login-native.php

When I click on register it gives me an error The action you have requested is invalid.

I am submitting a form with action ="http://tensports.zeecdn.com/ee/index.php/register/login-signup"

Can I get some guidance on this?

In case if you want to refer the code :

<form id="signupForm" action="<?php echo $STATIC_URL;?>ee/index.php/register/login-signup" method="post">
    <input type="hidden" id="form_status" name="form_status" value="signup">
    <li class="emId remReg"><a href="javascript:void(0);" onClick="javascript:validate_signup();"
        class="acLogin">Register</a>
    </li>
    </ul>
</form>

my template:

http://codepad.org/eaKqsvTJ

  • Please share the code you are using. Narrow it down to a specific snippet of code which can recreate the issue. It would also help to explain why you linked to a raw PHP file - is that part of ExpressionEngine? – Adrian Macneil Nov 29 '13 at 11:55
  • @AdrianMacneil:the problem is it just does not go in to template that I created in register group...I could give you the code...narrow it down too...but my area of concern is the data just does not go to this template..wait i will share the code – user2133 Nov 29 '13 at 12:17
  • 1
    Try adding a secure forms hash to your form: <input type="hidden" name="XID" value="{XID_HASH}" />. – Derek Hogue Nov 29 '13 at 13:44
  • @DerekHogue: can i get a link or something to know about secure forms..Have u faced this problem before? – user2133 Nov 29 '13 at 14:00
  • Yes, I have -- though not until 2.7, when they tightened-up secure forms further. Bjørn's answer is on the money. – Derek Hogue Nov 29 '13 at 17:37
7

You will get that error if you have secure forms enabled, and you submit a form without including a valid XID in the post.

More here: http://ellislab.com/blog/entry/putting-the-secure-in-secure-mode-forms

Add this to your form:

  <input type="hidden" name="XID" value="{XID_HASH}">  

You can disable secure forms in your config, although this is not recommended:

$config['secure_forms'] = "n";
  • I have used your solution to fix my forms and they're working, however I have a few text fields in them that use ajax to autocomplete and they are giving me this error too, I don't know how to fix that. Any ideas? – Isabel Dec 2 '13 at 12:38
  • The answer to my problem was here: link – Isabel Dec 2 '13 at 14:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy