2

In my Playa field I've set a specific Channel, Author, and Status that the user will be able to filter on when on the EE publish page in the control panel. However it still presents a filter option to filter by Author and Status. The options available are only the ones that I set but even so I'd prefer to remove complexity and confusion by removing the option to add a specific filter — just search by typing in the box.

Is this possible? If so, how?

4
  • Hi, Ian - can you paste a screenshot of your Playa custom field setup please? – Lisa Jan 29 '13 at 18:28
  • Hey Ian, just wanted to check in on this. If you can add that screenshot, as well as version details for EE and Playa, I'll be happy to help out! Thank you! – Lisa Jan 30 '13 at 17:34
  • Hi Lisa, EE is v2.5.5 and Playa is 4.3.3 (both up to date). Here's a screenshot to show that two filter options are allowed despite specifying a single Author and Status (making filtering redundant) . Is there any way to remove these filter options when redundant? – Ian Feb 4 '13 at 13:04
  • Lisa, I've marked Alex's answer below as accepted as that seems to be the best way but if you know of a native way to do this from within the field itself then that would be ideal. Let me know. If not then can this be put forward as a feature suggestion? There's really no point having redundant filtering options present & I always like to keep things as simple as possible. – Ian Feb 4 '13 at 13:09
3

I am assuming that what you're asking is for a way to remove the +/- buttons that allow for additional filter menus (Category/Author/Status) to be shown to the user on the Playa drop panes interface.

enter image description here

If that's the case, the only way you can hide those (as far as I can see) is to use some JS or CSS. You can use CP CSS & JS to add bits of CSS or JS to the Control Panel.

Here is a jQuery snippet that will remove the +/- buttons. Note that you'll need to replace the field_id (XX) with the actual field_id.

$(document).ready(function() {
    $('#field_id_XX').find('.playa-dp-remove, .playa-dp-add').hide();
});

Or with CSS:

#field_id_XX .playa-dp-remove, 
#field_id_XX .playa-dp-add
{
    display:none;
}
1
  • Hi Alex, spot on in your assumption. In my case as I'm specifying a specific Author and Status the filtering options are redundant so I'd like to simplify and remove these. Thanks for the tip with both the addon and the example code. Ideally I was looking for a native way to do this within Playa but if this is the only way then that's perfect. Thanks very much for your suggestion. I'll give this a try. – Ian Feb 4 '13 at 13:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.