Mautic Community Forums

Form embed script missing the https:

Anyone know why this form embed URL is wrong?

Brand new Mautic install and I got excited and wanted to try and create a website form and see it working :)



I have created the form and when I try to embed it on my site you can see here the URLs in the embed scripts are wrong.

https://www.dropbox.com/s/r1zcz5bv1xl2j78/mautic-forms.png?dl=0



Does anyone know why? Did I miss a setting configuration?



Thanks,

Alan


Anyone know why this form embed URL is wrong?
Brand new Mautic install and I got excited and wanted to try and create a website form and see it working :slight_smile:

I have created the form and when I try to embed it on my site you can see here the URLs in the embed scripts are wrong.
https://www.dropbox.com/s/r1zcz5bv1xl2j78/mautic-forms.png?dl=0

Does anyone know why? Did I miss a setting configuration?

Thanks,
Alan

@alanorourke is ok will works :slight_smile:

Thank you Ninjoan, You are right. I have never seen that before :slight_smile:

However the iframe form still does not display and on the javascript form the asset does not download. The button just hangs on “Please wait…”

Test page is at https://www.onepagecrm.com/test-mautic-form-page

Any ideas?

Thank you.

Hi @alanorourke If you view the Security properties for the page (in chrome) this come up…

Refused to display 'https://onepagemkt.com/form/1' in a frame because it set 'X-Frame-Options' to 'SAMEORIGIN'.

and

XMLHttpRequest cannot load https://onepagemkt.com/mtc. Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'https://www.onepagecrm.com' is therefore not allowed access.

Not having progressed passed the testing phase at this stage, I can’t really offer much advise, but but check the Settings / Configuration / CORS Settings. It seems that the default is to restrict the domains.

Edit: I was snooping round the Middleware code yesterday and in CORSMiddleware.php it checks for an OPTIONS request and returns a valid response only if requestOriginIsValid. In other words, what I said above should work. You could try putting in https://www.onepagecrm.com into the Valid Domains text box.

Thank you MarkLL for pointing me in the right direction.
The security restriction was on the server itself not Mautic. All working now :slight_smile:

Alan