Read FAQ
NEW
Bitrix24 Support
Registration and Authentication
How to start
My Profile
Feed
Messenger
Calendar
Bitrix24.Docs
Bitrix24.Drive
Bitrix24.Mail
Workgroups
CoPilot - AI in Bitrix24
Tasks and Projects
CRM
Contact Center
Sales Center
CRM Analytics (beta)
BI Builder
Sales Intelligence
Inventory Management
Marketing
Sites
Online Store (beta)
CRM + Online Store
CRM Store (beta)
Bitrix24.Sign
e-Signature for HR
Company
Knowledge base (beta)
Automation
Workflows
Telephony
Market
Subscription
Settings
Enterprise
Desktop App
General questions
Bitrix24 On-Premise

Bitrix24Care

Working with CRM form code

Despite the fact that you will have to work with the new form code less often, the solution of complex problems should be entrusted to a programmer or employee with the necessary level of competence.

In this article, we will consider how to solve unusual tasks when using new forms.


How to place the same form several times on the same page?

Copy the form code and place the form on any page of the site.


Can I use a CRM form and a widget with this CRM form on the same page?

Yes, you can. Copy the code for the CRM form and insert it at any place on the page.


How can I add several contact forms on one page?

Copy the form code and insert it at any place .


Can I set values in the form code for fields that are not placed on this form?

Yes, you can set values to all forms on the page or to one specific form. Remove /* and */ to include a script for a specific form, in this case with ID 792.

Place this script on the page BEFORE connecting the forms.

<script>
window.addEventListener('b24:form:init', (event) => {
    let form = event.detail.object;
    /*if (form.identification.id == 792) {
        form.setProperty("param1", "1");
        form.setProperty("city", "San Francisco");
    }*/
});
</script>

How to specify field values for all widgets on the page?

Place this script on the page BEFORE connecting the widget.

<script>
window.addEventListener('b24:form:init', (event) => {
    let form = event.detail.object;
    form.setValues({
        "name": "Michael",
        "last-name": "Wilson",
        "email": "michael@example.com",
        "phone": "+11234567890"
    });
});
</script>
Was this information helpful?
Integration specialist assistance
That's not what I'm looking for
Complicated and incomprehensible text
The information is outdated
It's too short. I need more information
I don't like the way this tool works
Go to Bitrix24
Don't have an account? Create for free