A
A
Alexey Larionov2019-08-05 17:49:27
JavaScript
Alexey Larionov, 2019-08-05 17:49:27

How to make a form for Bitrix Start pop-up and link the send to the goal in Yandex Metrica?

There is a form code. How to make this form for Bitrix Start pop-up? Step by step if possible. New to Bitrix. And link the sending to the goal in Yandex Metrica

<div class="kc-elm kc-css-884210 kc_col-sm-7 kc_column kc_col-sm-7 hidden-xs">
        <div class="kc-col-container">
          <div class="contact contact-page-area">
            <div class="row">
              <div class="contact-area contact-area-2 contact-area-3">
                <h2>Отправьте нам свой вопрос</h2>
                <div class="contact-form">
                  <div class="wpcf7" dir="ltr" id="wpcf7-f5-p23-o1" lang="en-US" role="form">
                    <div class="screen-reader-response">
                    </div>
                    <form action="" class="wpcf7-form" method="post" novalidate="novalidate">
                      <div class="contact-home">
                        <div class="half-col">
                          <span class="wpcf7-form-control-wrap text-100"><input aria-invalid="false" aria-required="true" class="wpcf7-form-control wpcf7-text wpcf7-validates-as-required form-control" name="f1_user_name" id="f1_user_name" placeholder="Ваше имя" size="40" type="text" value=""></span>
                        </div>
                        <div class="half-col">
 <span class="wpcf7-form-control-wrap text-329"><input aria-invalid="false" aria-required="true" class="wpcf7-form-control wpcf7-text wpcf7-validates-as-required form-control" name="f1_user_phone" id="f1_user_phone" placeholder="Контактный телефон" size="40" type="text" value=""></span>
                        </div>
                         <!--                                                                                <div class="half-col"><span class="wpcf7-form-control-wrap email-633"><input aria-invalid="false" aria-required="true" class="wpcf7-form-control wpcf7-text wpcf7-email wpcf7-validates-as-required wpcf7-validates-as-email form-control" name="email-633" placeholder="E-mail" size="40" type="text" value=""></span></div> -->
                        <div>
                          <span class="wpcf7-form-control-wrap textarea-8"> <textarea aria-invalid="false" aria-required="true" class="wpcf7-form-control wpcf7-textarea wpcf7-validates-as-required form-control" cols="40" name="f1_user_text" id="f1_user_text" placeholder="Описании ситуации и Ваши вопросы" rows="10"></textarea> <br>
 <input type="checkbox" checked="checked" id="user_agreement" onclick="check_agreement();"> <label for="user_agreement">Согласен на <a href="/politika-konfidencialnosti/" target="_blank">обработку персональных данных</a></label> </span>
                        </div>
                        <div class="submit-btn-wrapper">
 <input class="wpcf7-form-control wpcf7-submit theme-btn" type="button" id="form_sumbit_button" value="Получить консультацию" onclick="ask_online(); return false;">
                        </div>
                      </div>
                    </form>
                  </div>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>

Answer the question

In order to leave comments, you need to log in

1 answer(s)
Y
Yaroslav Alexandrov, 2019-08-06
@alexyarik

At the Start, there are two implementation options:
1) Make your own custom html form in Ajax, return the result of the form execution with Ajax where you put the metric target code
2) Can be done on iblock.element.add infoblocks with the creation of your own mail handler in init.php, also on ajax, where you hang the metric goal code on the execution result.
There is a third option, write your own module, or upgrade to Standard, there is a web forms module.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question