I'm working on a newsletter signup form (following this tutorial). When I hit the signup button Magento redirects me to the "form action url" and displays the response on a white page only:

{"message":" Thanks for signing up! "}

I have no idea what is causing the issue.

My controller

class MyModule_Signupx_IndexController extends Mage_Core_Controller_Front_Action
    public function indexAction()

    public function signupxAction()
        $response = array();

Javascript in template

<script type="text/javascript">
    //< ![CDATA[
    var customForm = new VarienForm('form-signupx');

        jQuery('#signupx').click(function (){
            var data = jQuery('#form-signupx').serialize();
            var url= "<?php echo $formActionUrl; ?>";
                console.log("This does show up, just before the redirect happens");
                          url: url,
                          dataType: 'json',
                          type : 'post',
                          data: data,
                          success: function(data){
                                console.log("This does not show up in console");



Thank you so much in advance!

1 Answer 1


I do not know your form but please make sure you submit the form with a button from type button and not submitting it by an input field:

<button id="xyz" title="Sign up" type="button"><span><span>Sign up</span></span></button>

Input won't work

  • Oh my god. That was it! Thank you so much!
    – Xavin
    Commented Apr 15, 2016 at 20:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.