Mautic won't receive data via AJAX

I’ve installed a Bitnami AMI for Mautic. Imported my leads and created two forms. Now I can send data via AJAX but Mautic is not updating.

Here is how I’m sending my user’s information:

Code:
var saveMauticSignupEmail = $scope.saveMauticSignupEmail = function() { var p1 = { ok: 1 }; $http.post('http://54.233.XXX.XXX/form/submit?formId=2', { data: 'mauticform[email]=' + $scope.info.email + '&mauticform[utm_source]=' + mautic.utm_source + '&mauticform[utm_medium]=' + mautic.utm_medium + '&mauticform[utm_campaign]=' + mautic.utm_campaign + '&mauticform[utm_term]=' + mautic.utm_term + '&mauticform[utm_content]=' + mautic.utm_content + '&mauticform[formId]=2&mauticform[return]=' + p1 + '&mauticform[submit]=' + 1 + '&mauticform[formName]=cadastrosoemaillandingpageprincipal', dataType: 'json', headers: { 'Accept': 'application/json', 'Content-Type': 'application/x-www-form-urlencoded' } }).success(function(response) { registerInfo($scope.info); }).error(function(response) { registerInfo($scope.info); }); };

I do not receive ANY error but Mautic is not creating the leads receive in this form.

---- EDIT ----
I realised that I'm receiving 204 (no content) on my access.log. I think the way that I'm passing the data is correct, and this was working in my oldest Mautic installation.
Code:
[22/Sep/2017:14:51:44 +0000] "OPTIONS /form/submit?formId=2 HTTP/1.1" 204 - [22/Sep/2017:14:51:44 +0000] "POST /form/submit?formId=2 HTTP/1.1" 302 608

I’ve installed a Bitnami AMI for Mautic. Imported my leads and created two forms. Now I can send data via AJAX but Mautic is not updating.
Here is how I’m sending my user’s information:

var saveMauticSignupEmail = $scope.saveMauticSignupEmail = function()
        {
            var p1 = { ok: 1 };
            $http.post('http://54.233.XXX.XXX/form/submit?formId=2', 
                {
                    data: 'mauticform[email]=' + $scope.info.email + '&mauticform[utm_source]=' + mautic.utm_source + '&mauticform[utm_medium]=' + mautic.utm_medium + '&mauticform[utm_campaign]=' + mautic.utm_campaign + '&mauticform[utm_term]=' + mautic.utm_term + '&mauticform[utm_content]=' + mautic.utm_content + '&mauticform[formId]=2&mauticform[return]=' + p1 + '&mauticform[submit]=' + 1 + '&mauticform[formName]=cadastrosoemaillandingpageprincipal',
                    dataType: 'json',
                    headers: {
                        'Accept': 'application/json',
                        'Content-Type': 'application/x-www-form-urlencoded'
                    }
                }).success(function(response)
                {
                   registerInfo($scope.info);
                }).error(function(response)
                {
                    registerInfo($scope.info);
                });
        };

I do not receive ANY error but Mautic is not creating the leads receive in this form.

---- EDIT ----
I realised that I’m receiving 204 (no content) on my access.log. I think the way that I’m passing the data is correct, and this was working in my oldest Mautic installation.

[22/Sep/2017:14:51:44 +0000] "OPTIONS /form/submit?formId=2 HTTP/1.1" 204 -
[22/Sep/2017:14:51:44 +0000] "POST /form/submit?formId=2 HTTP/1.1" 302 608

UPDATE:
I’m receiving this error:

mauticError:This form is no longer available.

All my forms are PUBLISHED.

1 Like