Hide checkboxes in dropdown

Home Forums Calendar Products Filter Bar Hide checkboxes in dropdown

Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #732668
    toerismeovl
    Participant

    Hi,
    Iw would like to hide the checkboxes ‘Morning, afternoon, evening and night’ in the last, renamed time filter (http://mediaplanning.tov.be/mediaplanning/?action=tribe_list&tribe_paged=1&tribe_timeofday%5B%5D=allday) so i can only see and select the first option.

    Can I do this in css or another way?

    #733340
    Brian
    Keymaster

    Hello,

    I can help you out with this customization.

    You have two options.

    Option 1
    You can choose to just turn off the Time Filter in the Settings since you only want people to select one option anyway.

    Go to Events->Settings then to the Filter tab, uncheck Time in the Available Filters and then save.

    Option 2
    You can try adding this css and it should hide all but the All Day Option.

    #tribe_events_filters_wrapper #tribe_events_filter_item_timeofday ul li {
    display:none;
    }

    #tribe_events_filters_wrapper #tribe_events_filter_item_timeofday ul li:first-child {
    display:block;
    }

    Let me know if that works for you or you would like some more help.

    Thanks

    #734629
    toerismeovl
    Participant

    Thank you, that works perfectly!

    Only it’s not working exactly the way i’m hoping it will, just yet. We would like that the only left over option in time (wich is now called ‘langlopende events’ => http://mediaplanning.tov.be/mediaplanning/) only shows when checked. Is there any way to do this? (like standard check all hidden boxes?)

    Thank you so much for your help!

    #735446
    Brian
    Keymaster

    Hello toerismeovl,

    Glad the first coding is working.

    As for the second part. There is no easy to make the hidden check boxes through our plugin.

    However, you could try doing it with jQuery.

    I tested this coding out and got it to work to check the Morning, Afternoon, etc boxes even when hidden.

    jQuery(document).ready(function(){
    jQuery("#tribe_events_filter_item_timeofday ul li:not(:first-child) label input").prop("checked", true);
    });

    That should be enough to get you close to what you would like. You may have to make some more changes on your own.

    Let me know if you get stuck on this.

    Thanks

    #737515
    toerismeovl
    Participant

    Ok thank you! But where do I add this JQuery? (I’m not a coder, so I need a little more step-by-step guidance here).

    #737876
    Brian
    Keymaster

    Hi,

    I can help out a little more, but I have given you the code and it is going to be up to you to figure out how to take it from here.

    I do not have a step by step guide for this as there are many different ways to add scripts.

    However, the easiest way could be a plugin such as:

    Header and Footer Scripts

    Following their instructions you should be able to take it from here and copy that script in.

    If you find an error or some issue please let me know.

    Thanks

    #739537
    toerismeovl
    Participant

    Hi Brian,

    I managed to add the script with the ‘custom style script’ plugin. Only I notice it messes up the search. Everything is correctly checked, you can see this when I remover the CSS that hides the boxes => http://mediaplanning.tov.be/mediaplanning/

    But when searching, it gets stuck. And it does check everything, but it’s not already searched on the checkboxes when de page is loaded/ the results aren’t loaded correctly, if you know what I mean 🙂

    I feel like we’re almost there. Can the script be adjusted to counter these errors?

    Thank you so much for the help!

    #739758
    Brian
    Keymaster

    I am not seeing errors on my site using it or on your site. On my site everything is working correctly.

    Does the searching work without the coding or is stuck too?

    Was the search working before?

    Can you turn off the ‘custom style script’ plugin too and check the search to make sure that is not in conflict.

    If it is stuck only with the coding there is not much else I can do to it.

    Let me know what you find out.

    #739896
    toerismeovl
    Participant

    You’re right, it was a corrupt plugin. I found one that doesn’t conflict anymore. And.. it works!!

    The only thing I need now is that when I open the page (http://mediaplanning.tov.be/mediaplanning/) there’s already a search action. My checkboxes are checked, but I don’t have the results yet. Is it possible to add this to the code?

    Thanks!

    #740195
    Brian
    Keymaster

    Glad the issue is fixed and the events are loading.

    Unfortunately, I do not have any other coding to give you.

    We try to help people get started on a customizations, but ultimately it is up to you get it how you would like it.

    So I am going to have to leave up to you to figure it out from here.

    #745983
    toerismeovl
    Participant

    Hi Brian,

    That’s too bad. I’m not a coder and know nothing about JQuery or other programming. But I appreciate the help you’ve given me so far.

    #746475
    Brian
    Keymaster

    Glad we could be of some help, sorry we do not have anything else for you. I am going to close this ticket as the original question is resolved as far as we can take it. If you have any more questions or need help on something else, please create a new ticket.

    Thanks

Viewing 12 posts - 1 through 12 (of 12 total)
  • The topic ‘Hide checkboxes in dropdown’ is closed to new replies.