Overslaan naar inhoud
Menu
Je moet geregistreerd zijn om te kunnen communiceren met de community.
Deze vraag is gerapporteerd
3 Antwoorden
10909 Weergaven

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
Annuleer
Beste antwoord

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
Annuleer
Beste antwoord

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

position: relative; top: -100px;


Avatar
Annuleer
Beste antwoord

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
Annuleer
Gerelateerde posts Antwoorden Weergaven Activiteit
5
dec. 23
31228
2
jul. 21
9024
0
mei 21
4355
4
mei 25
1844
2
jan. 25
1913