Can't fill contact form inputs when fixed search is added to the site

Home Forums Product Support Forums Ajax Search Pro for WordPress Support Can't fill contact form inputs when fixed search is added to the site

This topic contains 5 replies, has 2 voices, and was last updated by Ernest Marcinko Ernest Marcinko 8 years, 6 months ago.

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #7731
    Viitami
    Viitami
    Participant

    Hi,

    When I add Ajax search pro on our site as fixed (by adding the shortcode for templates to the header of the site) I can’t fill details in the contact form inputs when viewing the site on mobile phone.

    Is the header wrong place to add the <?php echo do_shortcode(‘[wpdreams_ajaxsearchpro id=1]‘); ?> shortcode or what might be wrong?

    Is it possible to not load the search when viewed with mobile devices?

    Thanks,
    Miko

    #7732
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi!

    If you use the search form on a different location (footer widget, sidebar etc..), then is it working?
    I don’t think the location should make any difference in this case.

    Can you link me to a page where the plugin and the contact form is active? I would like to check this out on my mobile to see if there are any error messages or anything related.

    I’m not sure if loading on non-mobile is possible, but there is actually a built-in server side mobile detection function called wpdreams_ismobile() in ajax search pro, so you can try to change the shortcode to something like:

    <?php if ( wpdreams_ismobile() == 0 ) { echo do_shortcode('&#91;wpdreams_ajaxsearchpro id=1&#93;'); } ?>

    Although I’m not sure if that will work, the plugin might not be loaded in the header stage yet, so it might show a warning that the function is not defined, but it’s worth a try.

    Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


    #7733
    Viitami
    Viitami
    Participant
    You cannot access this content.
    #7734
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Indeed, there is some connection, I was able to re-create the problem on my test environment with similar fields. I will have to investigate this further to find what is exactly causing it to fix it before the upcoming release.

    Until then, I have found a temporary solution, which might work for you as well. Put this script into the footer.php file of your current theme:

    
    <script>
    jQuery(function($){
       $("._full_width input").click(function(e){ e.preventDefault();
           e.stopPropagation();
           e.stopImmediatePropagation();
       });
    }); 
    </script>
    

    This should prevent any click related events on the contact form.

    Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


    #7735
    Viitami
    Viitami
    Participant
    You cannot access this content.
    #7736
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Oh yeah, I forgot about textareas and possible select fields. Change the code to:

    <script>
    jQuery(function($){
       $("._full_width input, ._full_width textarea, ._full_width select").click(function(e){
           e.preventDefault();
           e.stopPropagation();
           e.stopImmediatePropagation();
       });
    });
    </script>

    That should include everything.

    Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


Viewing 6 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic.