L
L
Lyabache2020-07-23 14:43:23
JavaScript
Lyabache, 2020-07-23 14:43:23

Submit button not working on quiz on mobile, Bootstrap3 wordpress site, what's the problem?

Hello. The submit button does not work on the quiz on mobile devices, the desktop version submits without problems, the site is on Bootstrap3 wordpress, what's the problem? The site itself is a button5f19779aacb8d707825110.png

add_action('wp_ajax_fo','fo_callback');
add_action('wp_ajax_nopriv_fo', 'fo_callback');
function fo_callback(){
  $nim=$_POST['man'];
  $year=$_POST['wel'];
  $nil=$_POST['wei'];	
  $nik=$_POST['wep'];
  $nij=$_POST['woo'];
  $tg=$_POST['weq'];
  $ves=$_POST['ves'];	
  $wec=$_POST['wec'];
  $wop=$_POST['wop'];
  $llh=$_POST['llh'];
  $tx=$_POST['tx'];
  $ppp=$_POST['ppp'];	
  $qwq=$_POST['qwq'];
  $nin=$_POST['nin'];
  $nip=$_POST['nip'];
  
  
  
  $zag='Заявка с сайта';
  $otvet='Пол: '.$nim.'<br>Цель: '.$year.'<br>Физическая активность: '.$nil.'<br>Возраст: '.$nik.'<br>Вес: '.$nij.'<br>Рост: '.$tg.'<br>Тип фигуры: '.$tx.'<br>Вес к которому стремлюсь: '.$ves.'<br>Вредные превычки: '.$wec.'<br>Сколько сплю: '.$wop.'<br>Сколько пью водs: '.$llh.'<br>Сколько готовлю по врмени: '.$ppp.'<br>Что хочу видеть в рационе: '.$qwq.'<br>Имя '.$nin.'<br>Телефон: '.$nip;
  
  
  print_r($_POST['name']);
  
  
  $headers = array(
  
  'content-type: text/html'
    );
  
  wp_mail('amail.ru',$zag,$otvet,$headers);
  wp_die();
}


$('.subkvz').on('click',function (){
       var t= $('.brv').attr('data-text');
    var name=$('#formkv').serialize();
    name+='&tx='+t;
    console.log(name);
    $.post('/wp-admin/admin-ajax.php',name,function(){
      
    alert('Ваше заявка отправлена')	
      
      
      
    });
      
    $.fancybox.close();
    
    
  });

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question