I
I
ilysion_in_life2018-09-26 18:53:23
JavaScript
ilysion_in_life, 2018-09-26 18:53:23

Question reCapcha how to load through jquery?

Hello, can you please tell me what I'm doing wrong? I am trying to load a captcha in a popup window and when it is called, the captcha is not displayed here is the code

render_modal: function(doctor, date) {
          var sHtml = '';

          sHtml += '<div id="appointment_modal">';
              sHtml += '<div class="remove_block"><span id="remove_appointment">x</span></div>';
              sHtml += '<p class="appointment_modal_header">Заявка на прием</p>';
              sHtml += '<form id="appointment_modal_form">';
                  sHtml += '<div class="appointment_modal_input"><input id="appointment_fio" type="text" name="fio" value="" placeholder="ФИО (полностью)"  /></div>';
                  sHtml += '<div class="appointment_modal_input"><input id="appointment_phone" type="text" name="phone" value="" placeholder="Телефон для связи"  /></div>';
                  sHtml += '<div class="g-recaptcha" data-sitekey="6LeoQ3IUAAAAAB5QhuDVElf9MEyPxYIpztgPveqC"></div>';
          sHtml += '<div class="appointment_modal_input"><input id="appointment_send" type="submit" name="send" value="Отправить" /></div>';
                  sHtml += '<input type="hidden" name="doctor" value="' + doctor + '" />';
                  sHtml += '<input type="hidden" name="date" value="' + date + '" />';
              sHtml += '</form>';
          sHtml += '</div>';

      return sHtml;
      }

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Ainur Valiev, 2018-09-28
@vaajnur

grecaptcha.reset();
// или 
grecaptcha.render('id_of_recaptcha_el');

phpjs.ru/2017/07/18/google-captcha-v2

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question