How do I move the "explanation bubble" to a different form field?

Home Forums Ticket Products Event Tickets Plus How do I move the "explanation bubble" to a different form field?

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #1460965
    Shane
    Participant

    I installed a few lines of code that I found in one of your forums and the code works great. The only exception is that the bubble that explains the error is pointing to the wrong form field and people are getting confused. I have attached a screenshot of what I mean.

    How do I move it to the input box above it? Thanks.

    #1461196
    Jennifer
    Keymaster

    Hi Shane,

    Can you please send me a link to the post where you found the code, along with a copy of the code that you added? Per our forum guidelines, we are limited in how much support we can provide for custom coding, but I’ll be happy to take a look and try to point you in the right direction!

    Thanks,

    Jennifer

    #1462635
    Shane
    Participant

    I can’t find the post, but it was in a forum on here. Anyway, here is the code. It works great, it just puts the bubble on the wrong form item.

    function tribe_prevent_add_cart_empty() {
    echo ‘

        jQuery( document ).ready(function(){
            jQuery( "form.cart" ).each(function(){
                var tribe_empty_form_message = "Please select at least one item before submitting";
                var tribe_cart_submit_button = jQuery( this ).find( "button[type=submit]" )[0];
                var tribe_checkout_fields = jQuery( this ).find( "input[type=number]" );
                tribe_cart_submit_button.setCustomValidity( tribe_empty_form_message );
                tribe_checkout_fields.each(function(){
                    jQuery( this ).on( "change", function(){
                        for (var i = 0, total_tickets = 0; i  0 )
                            tribe_cart_submit_button.setCustomValidity( "" );
                        else
                            tribe_cart_submit_button.setCustomValidity( tribe_empty_form_message );
                    });
                });
            });
        });
    ';
    

    }
    add_action( ‘tribe_events_single_event_after_the_meta’, ‘tribe_prevent_add_cart_empty’ );

    #1463015
    Jennifer
    Keymaster

    Thanks for sending that code. It looks like the message is showing in the intended location, but if you would like it to show in a different location, then you would need to modify the code.

    I’m checking with one of our developers to see what he can recommend – I’ll let you know as soon as I hear back!

    #1482437
    Support Droid
    Keymaster

    Hey there! This thread has been pretty quiet for the last three weeks, so we’re going to go ahead and close it to avoid confusion with other topics. If you’re still looking for help with this, please do open a new thread, reference this one and we’d be more than happy to continue the conversation over there.

    Thanks so much!
    The Events Calendar Support Team

Viewing 5 posts - 1 through 5 (of 5 total)
  • The topic ‘How do I move the "explanation bubble" to a different form field?’ is closed to new replies.