Hello Guys,
I want to create one new page in Odoo Website, Same as Odoo https://www.odoo.com/pricing,
How can we do that pls help me guys. I am new in website module page creation concept.
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
Hello Guys,
I want to create one new page in Odoo Website, Same as Odoo https://www.odoo.com/pricing,
How can we do that pls help me guys. I am new in website module page creation concept.
Hi Kumar ,
Try this to create a new website form:
The short version: create a new page from website_builder and copy the HTML sources of contactus and contact_form together into your new page. Remove the kwargs div and start configuring to your liking.
...and these are the step-by-step instructions and some tips and tricks at the bottom:
Create a new page from the frontend (Content - New Page)
Open the 'Contact Us' form and go to Customize - HTML Editor
Copy the <div id="wrap">....</div> and its entire content (i.e. the entire page minus the <t> tags)
Go back to your 'new page', customize - HTML editor and delete everything between its <t> tags
Paste your form code between the <t> tags instead.
Go back to your 'Contact Us' form, customize - HTML editor.
From the dropdown select the file ' - Contact Form' (it should now say "Template ID: website_crm.contactus_form" at the top)
Copy the entire <form ....>...</form> tag incl its content
Back to the 'new page', customize - HTML Editor
Now replace the <div ... name="mail_button" > and its entire contenct with the <form> tag and its content by hitting paste (from point 8).
Now comment out or delete the section (IMPORTANT)
<t t-foreach="kwargs" t-as="kwarg">
<input type="hidden" t-att-name="kwarg[0]" t-att-value="kwarg[1]"/>
</t>
This is essentially it. Now you have a functioning copy of the contact form and you can start to modify it as nicely demonstrated here https://www.youtube.com/watch?v=lKnkyh0ctUI
Tips & Tricks:
You can use any of the field names in the Sales Lead Form to directly insert values into the desired fields from your form. For instance I wanted to make sure that each 'Lead' from this form is marked as coming through a separate channel. To do this I added a new Channel "Custom Form Submission" (which in my case got Channel ID 6 in the db). Channels are e.g. accessible from the Sales Lead form under Extra Info - Marketing. Then by adding a hidden field to the form's form-group, each form submission creates a lead which will have the right channel associated with it.
The code for the hidden field is below. Make sure to adjust the t-attf-value (i.e. the channel id) according to your setup:
<div t-attf-class="form-group">
<div class="col-md-7 col-sm-8">
<input type="hidden" class="form-control" name="medium_id" t-attf-value="6"/>
</div>
</div>
This should work with all your fields if you get the fieldname and the data type
Create an account today to enjoy exclusive features and engage with our awesome community!
РегистрацияRelated Posts | Ответы | Просмотры | Активность | |
---|---|---|---|---|
|
1
сент. 23
|
1611 | ||
|
2
мая 24
|
31184 | ||
|
2
мар. 22
|
5559 | ||
|
2
февр. 18
|
6722 | ||
|
1
июн. 17
|
2778 |