|
52 | 52 | ---- |
53 | 53 |
|
54 | 54 | The :guilabel:`Form` block is used to collect information from website visitors and create records |
55 | | -in your database, if applicable. |
| 55 | +in your database, if applicable. To add a form to a website page, drag and drop the |
| 56 | +:guilabel:`Contact & Forms` category, then select the :guilabel:`Form block`. |
56 | 57 |
|
57 | 58 | .. image:: building_blocks/form-block.png |
58 | 59 | :alt: Example of a form block |
@@ -112,6 +113,40 @@ new (or any other) field on the form, select the field, then use the options ava |
112 | 113 |
|
113 | 114 | Once you have made the desired changes, click :guilabel:`Save`. |
114 | 115 |
|
| 116 | +Add an Odoo contact form on a non-Odoo website |
| 117 | +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 118 | + |
| 119 | +You can display an Odoo contact form on another website using an iframe. To do so, follow these |
| 120 | +steps: |
| 121 | + |
| 122 | +#. **Prepare the Odoo form:** Create a contact form on a page in Odoo Website and remove the |
| 123 | + :ref:`header design <website/header_footer/header-design>` and the :ref:`footer design |
| 124 | + <website/header_footer/footer-design>`. Make sure only the contact form remains on the page. |
| 125 | +#. **Generate an embeddable code:** Copy the URL of the Odoo form page and paste it into an iframe |
| 126 | + generator, such as `La Digitale.dev <https://ladigitale.dev/digitools/generateur-iframe>`_ or |
| 127 | + `iFrame Generator <https://www.iframe-generator.com/>`_ . Adjust the width and height for proper |
| 128 | + display. |
| 129 | +#. **Add the embedded code to the non-Odoo website:** Open the relevant page’s HTML (in the code |
| 130 | + editor or CMS) and insert the embedded code where the form should be displayed. |
| 131 | + |
| 132 | +.. example:: |
| 133 | + Example of an embedded code: |
| 134 | + |
| 135 | + .. code-block:: html |
| 136 | + |
| 137 | + <iframe src="https://example.com/odoo-form" |
| 138 | + style="border:0;" |
| 139 | + name="odooForm" |
| 140 | + scrolling="no" |
| 141 | + frameborder="0" |
| 142 | + marginheight="0" |
| 143 | + marginwidth="0" |
| 144 | + height="400px" |
| 145 | + width="600px" |
| 146 | + allowfullscreen> |
| 147 | + </iframe> |
| 148 | + |
| 149 | + |
115 | 150 | .. _website/building_blocks/embed_code: |
116 | 151 |
|
117 | 152 | Embed code |
|
0 commit comments