Skip to Content
Menu
This question has been flagged
3 Replies
10731 Views

Hi, I made a Form using odoo builder. but when I try to embed the form by getting it's iFrame it shows the whole page of the website not only the Form.
How to solve that, so i can get only the iFrame of the form and present it in other websites?

Avatar
Discard
Best Answer

I wrote a guide here using the small HTML code amendment to hide header + footer on a form page.

I want to put Odoo form on another website, but it got some errors. | Odoo

Avatar
Discard
Best Answer

Set the style of the iframe to hide the top X pixels like this:

position: relative; top: -100px;


Avatar
Discard
Best Answer

If you want to embed an Odoo website form in another website using an iframe and display only the form without the entire page, you can follow these steps:

Step 1: Get the URL of the Form:


    In Odoo, navigate to the form that you want to embed.

    Copy the URL from the browser's address bar.


Step 2: Create an HTML Page:Create an HTML page where you want to embed the form. Replace "YOUR_ODOO_FORM_URL" with the actual URL of the Odoo form that you copied.   


Step 3: Adjusting Odoo Website Configuration:


    Go to your Odoo website module.

    Navigate to the page where the form is located.

    Edit the page and make sure the page template is set to "synchronous" or "async" instead of "master" (master includes the entire page).

    Save your changes.


Step 4: Test the Embedded Form:


Open the HTML page you created in a web browser. You should see the embedded Odoo form without the entire page.

Additional Considerations:


    Cross-Origin Restrictions:

        Ensure that your Odoo server allows embedding from the domain where you are trying to embed the form. Some browsers may enforce cross-origin restrictions.

    Responsive Design:

        Adjust the width and height attributes of the iframe to suit your design and make it responsive.

    HTTPS:

        Make sure your Odoo server uses HTTPS. Some browsers may block iframes from loading content over HTTP when the parent page is served over HTTPS.

    Security and Privacy:

        Be cautious when embedding content from one domain into another, considering security and privacy implications. Ensure that you have proper authorization to embed the content.



Avatar
Discard
Related Posts Replies Views Activity
5
Dec 23
31138
2
Jul 21
8960
0
May 21
4326
4
May 25
1752
2
Jan 25
1821