Documentation

CRM form in Blocks

Bitrix24 (CRM) landing forms fairly easily can be integrated into blocks. It can be done as follows:

  1. Add the subtype key with the value of the form into the section of the block manifest.
  2. Place 'div' with the bitrix24forms class inside your block. The landing form will be showed there.
  3. Do not forget to add 'ext' key (inside assets) with the 'landing_form' value, which will connect all the necessary resources for forms to be operational.
    'assets' => 
            array ( 
                'ext' => array (
                        'landing_form'
                ),
        ),

Example

// example of a basic landing form registration
BX24.callMethod(
   'landing.repo.register',
   {
      "code":"test_form",
      "fields":{"NAME":"Test form",
         "SECTIONS":"other",
         "PREVIEW":"https://restapi.bx24.net/booking/cycles_b24.jpg",
         "CONTENT":"
" }, "manifest": { "block":{"subtype":"form"}, "assets":{"ext":["landing_form"]} } }, function(result) { if(result.error()) console.error(result.error()); else console.info(result.data()); } );


© «Bitrix24», 2001-2024