Skip to content

Commit c074636

Browse files
committed
[IMP] website: update form section in building blocks
task-5003367 closes #14889 X-original-commit: cffa547 Signed-off-by: Audrey Vandromme (auva) <[email protected]> Signed-off-by: Marion Spindler (masp) <[email protected]>
1 parent 266b0da commit c074636

File tree

2 files changed

+40
-1
lines changed

2 files changed

+40
-1
lines changed

content/applications/websites/website/structure/header_footer.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ the :ref:`menu <website/header_footer/header-content>`, the search bar, the sign
77
button, etc. The footer is displayed at the bottom of a web page and usually contains information
88
such as contact details, links, legal notices, and other options.
99

10+
.. _website/header_footer/header-design:
11+
1012
Header design
1113
=============
1214

@@ -150,6 +152,8 @@ editor, then, in the :guilabel:`Mega Menu` section:
150152

151153
To finalize changes, click on :guilabel:`Save`.
152154

155+
.. _website/header_footer/footer-design:
156+
153157
Footer design
154158
=============
155159

content/applications/websites/website/web_design/building_blocks.rst

Lines changed: 36 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,8 @@ Form
5252
----
5353

5454
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`.
5657

5758
.. image:: building_blocks/form-block.png
5859
: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
112113

113114
Once you have made the desired changes, click :guilabel:`Save`.
114115

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+
115150
.. _website/building_blocks/embed_code:
116151

117152
Embed code

0 commit comments

Comments
 (0)