Forms¶
Form blocks are used to collect information from website visitors and, if applicable, create records in the database. To add a form to a website page, drag and drop the Contact & Forms categorical building block, then select a block in the pop-up window.
Acțiune¶
By default, submitting a form sends an email containing the visitor’s submitted information. Depending on the apps installed on the database, additional actions that can automatically create records may become available. To choose a different action, click Edit, select a form field, navigate to the Style tab, and, in the Form section, select the desired Action:
Aplică pentru un job (Recrutare)
Create a Customer (eCommerce)
Creează un tichet (Helpdesk)
Creează o oportunitate (CRM)
Abonează-te la newsletter (Email Marketing)
Creează o sarcină (Project)
Mai multe modele: pentru a genera alte tipuri de înregistrări
By default, submitting the form redirects visitors to a Thank you page. Use the URL field to send them to a different page. Alternatively, select Nothing or Show Message in the On Success field to keep visitors on the form’s page.
It is also possible to define the Labels Width, specify whether fields are Required or Optional in the Marked Fields, and define a Mark Text to indicate required fields.
Sfat
Configure the visibility settings for forms.
Câmpuri¶
To add a new field to the form, navigate to the Style tab and click the + Field button in the Form or Field header section. To modify any field on the form, select the field, then use the options available in the Field section of the Style tab. For example, you can:
Schimbă Tipul câmpului.
Sfat
Este posibil să selectezi și un Câmp existent din baza de date și să folosești datele pe care le conține. Câmpurile disponibile depind de acțiunea selectată. Pot fi folosite și câmpuri de proprietate adăugate în baza de date.
Unele câmpuri sunt similare vizual, dar datele introduse trebuie să urmeze un format specific.
Editează Eticheta câmpului și adaptează-i Poziția.
Activați o Descriere pentru câmp. Comutați comutatorul și faceți clic pe descrierea implicită din formular pentru a o modifica.
Specifică dacă câmpul este Obligatoriu.
Use the Requirement field to add validation Conditions to ensure customers enter valid information. For example, set the condition requiring the Email field to contain an
@symbol.Adaugă o animație.
Edit the field’s visibility settings.
Depending on the selected field, the following options are available:
For text & string fields, such as Text, Long Text, Email, and Url, as well as numerical fields, such as Telephone, Number, and Decimal Number, you can define a Placeholder and a Default Value.
For the Long Text field, you can also specify the field’s Height.
The following selection fields are available:
Checkbox: Customers can select or clear the checkbox. Enable Default Value to have it selected by default.
Multiple Checkboxes: Customers can select multiple options.
Radio Buttons: Customers can select one option.
Sfat
For Multiple Checkboxes and Radio Buttons, define how the options are displayed: Horizontal or Vertical.
Selection: Customers can select one option from the drop-down menu.
For fields with multiple options, enable the options you want to make available by toggling the switch on. To remove an option, click the (remove) icon. To add a new option, click Add New Option and enter the option.
The Date and Date & Time fields allow customers to select a date and, if applicable, a time using the date selector. You can also define a Placeholder and a Default Value, e.g., to use a specific date/time by default.
Sfat
If needed, customize the (calendar) icon.
The File Upload field type allows customers to upload a file. You can define the Max # of Files as well as the Max File Size.
To apply the changes, click Save.
Sfat
Modify the text of the Submit button by clicking it and entering the desired text. Then, change the Button Position in the Submit Button section of the Style tab.
Adăugați un formular de contact Odoo pe un site web non-Odoo¶
Puteți afișa un formular de contact Odoo pe un alt site web utilizând un iframe. Pentru a face acest lucru, urmați acești pași:
Prepare the Odoo form: Create a contact form on a page in Odoo Website and remove the header and footer design. Make sure only the contact form remains on the page.
Generați un cod incorporabil: Copiați URL-ul paginii formularului Odoo și lipiți-l într-un generator de iframe, cum ar fi La Digitale.dev sau iFrame Generator. Ajustați lățimea și înălțimea pentru afișare corectă.
Add the embedded code to the non-Odoo website: Open the relevant page’s HTML (in the code editor or CMS) and insert the embedded code where the form should be displayed.
Example
Exemplu de cod încorporat:
<iframe src="https://example.com/odoo-form"
style="border:0;"
name="odooForm"
scrolling="no"
frameborder="0"
marginheight="0"
marginwidth="0"
height="400px"
width="600px"
allowfullscreen>
</iframe>