# Form not working

**URL:** <https://forum.mautic.org/t/form-not-working/6273>\
**Category:** Product Support\
**Created:** [October 18, 2016, 3:40pm UTC](https://forum.mautic.org/t/form-not-working/6273 "2016-10-18T15:40:54Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![mautic\_user](https://avatars.discourse-cdn.com/v4/letter/m/b19c9b/32.png) [@mautic\_user](https://forum.mautic.org/u/mautic_user)\
**Post date:** [October 18, 2016, 3:40pm UTC](https://forum.mautic.org/t/form-not-working/6273/1 "2016-10-18T15:40:54Z")

</div>

I made a form within mautic and embedded it in my Wordpress website via the plugin. When loading the page, I can see the following error in the browser console:

Code:

XMLHttpRequest cannot load http://my.mautic.domain/index.php/mtc. Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://my.website.domain' is therefore not allowed access.

  
After filling out the form, the following errors appear in the browser console:

Code:

POST http://my.mautic.domain/index.php/form/submit?formId=1 500 (Internal Server Error) Uncaught SecurityError: Blocked a frame with origin "http://my.mautic.domain" from accessing a frame with origin "http://my.website.domain". Protocols, domains, and ports must match.

  
How can I bypass these errors? Needless to say that the form does not work, the button label says "Please wait..." and nothing happens.  
  
I am using a self hosted version (2.2.1) and had no problems so far with simple email campaigns.

---

<div class="post-metadata">

**Author:** ![mautic\_user](https://avatars.discourse-cdn.com/v4/letter/m/b19c9b/32.png) [@mautic\_user](https://forum.mautic.org/u/mautic_user)\
**Post date:** [October 18, 2016, 3:40pm UTC](https://forum.mautic.org/t/form-not-working/6273/2 "2016-10-18T15:40:54Z")

</div>

I made a form within mautic and embedded it in my Wordpress website via the plugin. When loading the page, I can see the following error in the browser console:

```auto
XMLHttpRequest cannot load http://my.mautic.domain/index.php/mtc. Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://my.website.domain' is therefore not allowed access.
```

After filling out the form, the following errors appear in the browser console:

```auto
POST http://my.mautic.domain/index.php/form/submit?formId=1 500 (Internal Server Error)
Uncaught SecurityError: Blocked a frame with origin "http://my.mautic.domain" from accessing a frame with origin "http://my.website.domain". Protocols, domains, and ports must match.
```

How can I bypass these errors? Needless to say that the form does not work, the button label says “Please wait…” and nothing happens.

I am using a self hosted version (2.2.1) and had no problems so far with simple email campaigns.

---

<div class="post-metadata">

**Author:** ![mautic\_user](https://avatars.discourse-cdn.com/v4/letter/m/b19c9b/32.png) [@mautic\_user](https://forum.mautic.org/u/mautic_user)\
**Post date:** [October 18, 2016, 3:52pm UTC](https://forum.mautic.org/t/form-not-working/6273/3 "2016-10-18T15:52:51Z")

</div>

The XMLHttpRequest error can by bypassed for the moment through starting Chrome with “–disable-web-security”. Of course this is no solution but can help for the moment. Unfortunately the second error (Internal Server Error) remains.

---

<div class="post-metadata">

**Author:** ![mautic\_user](https://avatars.discourse-cdn.com/v4/letter/m/b19c9b/32.png) [@mautic\_user](https://forum.mautic.org/u/mautic_user)\
**Post date:** [October 18, 2016, 4:13pm UTC](https://forum.mautic.org/t/form-not-working/6273/4 "2016-10-18T16:13:56Z")

</div>

Looking into the Mautic log gave me the hint: In my form I was only asking for a phone number. Of course mautic was not able to identify the contact where this phone number should be written to. After adding a second field for the email the form worked fine.

This leads to another question: Is it possible to fill in the email address automatically if the user is already known?
