Quantcast
Channel: WordPress.org Forums » All Topics
Viewing all articles
Browse latest Browse all 59525

multiple yop polls in a page

$
0
0

Replies: 0

Hello there,

I’m using Yop Poll for AFC prediction. I have tabs in my page and in each tab I have one Yop poll shortcode so that user can predict each match separately. Each poll has a required custom field which collect user’s phone number. I noticed that user has to answer the question in first tab firstly in order to answer other tabs questions as well. otherwise he will receive an error that filling custom field is required even if the user has entered the phone number correctly. as soon as he answer the first tab’s question he would be able to answer other tabs as well. I have a js to validate user’s phone number which I don’t think cause the problem, please see

$(function() {

$('.tab-pane.active .basic-vote a').click(function(){
    var phone=$('.tab-pane.active .phone-number').val();

    if(phone.length < 11 || phone.indexOf('0')!==0){

          $('.tab-pane.active .phone-number').append('<span>لطفا شماره تلفن خود را با فرمت صحیح وارد نمایید.</span>')

     $('.tab-pane.active .phone-number').val('');

   }  

});
});

I would be very happy if someone help me with this.


Viewing all articles
Browse latest Browse all 59525

Trending Articles