Can't add custom filter per your tutorial

Home Forums Calendar Products Filter Bar Can't add custom filter per your tutorial

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #113504
    manishie
    Participant

    Hi,

    I’m following this tutorial: https://theeventscalendar.com/understanding-the-tribeeventsbar/, and I’m having the same issues as in this request: https://tri.be/support/forums/topic/adding-category-filter-to-search/. It appears as though your filter might not be working correctly.

    Here’s my code: http://pastebin.com/baUKbguF

    The filters bar is fine, showing the new dropdown. When the form is submitted, no data is sent for that field.

    Here jQuery serializing the form before submission ( jQuery(‘form#tribe-bar-form’).serialize(); ):
    “tribe-bar-view=http%3A%2F%2Fthesite.com%2Fevents%2Fupcoming%2F&tribe-bar-date=&tribe-bar-date-day=&tribe-bar-search=&tribe-bar-category=theater”

    But here are the headers actually being sent (from the Chrome Dev Tools network panel):
    action=tribe_list&tribe_paged=1&tribe_event_display=list&hash=8194e67c942a3be9f9b827d1308c5812

    As you can see, the field tribe-bar-category doesn’t actually get submitted by the form. A PHP error log statement from (see in the pastebin code) confirms that no field with that name is being received.

    #115996
    Barry
    Member

    You’re right, bear with us a little longer while we check this out. I think the issue is not so much with the tutorial but with the way some related JS code behaves prior to making an ajax request based on the Tribe Bar parameters – either way, we’ll get back to you as quickly as we can.

    Thanks for highlighting this issue 🙂

    #116272
    Barry
    Member

    Thanks for your patience.

    Right now, without a more extensive workaround, you would need to limit yourself to adding custom input elements (rather than a select or other form element). We’ve updated the tutorial to reflect this and will be addressing this limitation as quickly as we can.

    If you do need to use a select element then there are certainly a few options like adding an additional hidden input and populating its value according to the state of the select element … but we’d need to leave you to work through that (if it’s necessary) and, again, we’ll get this fixed in a future release.

    Thanks for reporting!

    #123970
    Barry
    Member

    Unfortunately we weren’t able to squeeze this one into our next upcoming release (3.5) but I wanted to drop a note in here to let you know it’s still on our radar and we will try hard to fit it in to the next release instead. Thanks for your support and patience in the meantime!

    #172254
    Leah
    Member

    Hi there,

    I just wanted to let you know that we have been working diligently on a fix for this issue. Our next release (3.6) will be available soon and should correct this problem. Please keep an eye on your Plugins and Updates pages for a version update. If you are still having problems after updating, please start a new thread with the details and we can assist you.

    Best,
    Leah

Viewing 5 posts - 1 through 5 (of 5 total)
  • The topic ‘Can't add custom filter per your tutorial’ is closed to new replies.