top_en

Bitrix24Care

Working with CRM web form's code

Important! Solutions and methods reviewed in this article require certain skills and knowledge. If you are not sure that you have these skills, it's better not to use these solutions. Or you can delegate this task to your administrator or the other person having the required skills.

We've already told you about our new CRM forms designer, how to create a form in a new designer and how to create a new design in it. But what if you are missing some features in the standard functionality of the CRM forms? In this article, we'll look at how to solve non-standard tasks when using new forms.

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

Just copy the CRM form code and paste it wherever you need.

Can the CRM form and website widget be used with the same CRM form on the same page?

Yes, copy the code of the CRM form and paste it wherever needed.

How to add multiple forms to the same page?

Just copy the CRM form code and paste it wherever you need.

Can I set field values ​​in the form code that are not in this form?

Yes, you can specify the field's values of all forms or a specific form on the page.
To do that, remove // to connect the script for a specific form, for example, with ID 792.
Put 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", "New York"); } }); </script> 

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

Put this script on the page BEFORE connecting the forms.

 
<script> window.addEventListener('b24:form:init', (event) => { let form = event.detail.object; form.setValues({ "name": "Andrey", "last-name": "Griffiths", "email": "andrey@example.com", "phone": "+19211111111" }); }); </script> 
This helped
Thanks :)
This didn't help
Sorry :(
Could you please tell us why:
It's not what I'm looking for
It's too complicated
Send feedback