ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Checkbox and Radio Button Field types

December 03, 2010 12:39pm

Subscribe [7]
  • #1 / Dec 03, 2010 12:39pm

    Loquela

    105 posts

    Hi there,


    Is it possible to display channel entries based on the value of a checkbox or radio button field type?

    It seems logical that the search parameter would be perfect for this, but I gather it doesn’t support these fieldtypes?

    Is there any other way of doing this?

    Thanks in advance,

    L.

  • #2 / Dec 03, 2010 3:04pm

    Joe Paravisini

    50 posts

    Have you tried using a checkbox/radio with the name=”” set to ‘keywords’ and the value=”” as the search term? As far as forms go, an input is an input and the http data only sees a list of name=value so the containing input type is somewhat irrelevant.

  • #3 / Dec 04, 2010 4:52pm

    Greg Salt

    3988 posts

    Hi Loquela,

    Can you clarify whether this is an EE 1.x or an EE 2.x question? Also, can you give us an example of what you are trying to do?

    Cheers

    Greg

  • #4 / Dec 06, 2010 1:43am

    Loquela

    105 posts

    Hi there,

    Thanks for your replies.

    I am using EE2.x. What I’m trying to do is filter channels bassed n the values of custom (checkbox) fields (search:field_name=)

    The user guide describes it here http://ellislab.com/expressionengine/user-guide/modules/channel/parameters.html#par_search but it also says that this parameter only supports “Text input” “text area” and “drop downs”.

    Are checkboxes/radio buttons therefore not supported? This wouldn’t make much sense as it would render such field pretty limited in their use.

    I have a channel for creating blocks of content that will be displayed throughout the site in various positions on a page, say top, left, right, etc… When creating an entry I what to select the postion the entry will occupy. The respective placeholders in the template then need to be able to filter the entries accordingly.

    I could of course use a drop down list for this but it would be much mor user friendly to use checkboxes or radio buttons (and of course, I could also use the Category manager I suppose…)

    I’m just not clear why if the “search:field_name=” paramater works for text, textarea and dropdowns, it doesn’t work for radios and checkboxes…?

    Many thanks,

    L.

  • #5 / Dec 06, 2010 3:58pm

    Ingmar

    29245 posts

    ... says that this parameter only supports “Text input” “text area” and “drop downs”. Are checkboxes/radio buttons therefore not supported?

    That is correct.

    I’m just not clear why if the “search:field_name=” paramater works for text, textarea and dropdowns, it doesn’t work for radios and checkboxes…?

    Because it’s been programmed that way. Feel free to make a Feature Request to change this behavior, please.

  • #6 / Dec 06, 2010 4:01pm

    Brandon Jones

    5500 posts

    Hi Loquela,

    You can test a radio or checkbox field with a conditional such as

    {if myoption == "Yes"}

    Where myoption is the name of the field. I agree that the functionality you describe would make sense in the search parameter, so please file a feature request. Thanks!

  • #7 / Dec 06, 2010 4:17pm

    Loquela

    105 posts

    We’ll that demonstrates an interesting distinction between a “Tech Support” and a “Support Specialist” 😊

    Many thanks for your suggestion, Brandon. That’s very helpful.

    L.

  • #8 / Dec 07, 2010 3:52am

    John Henry Donovan

    12339 posts

    Loquela,

    Ingmar answered with the same response that the Feature request was the way to go.

    While Brandon’s extra snippet is useful to demonstrate the testing of a checkbox or radio button of a conditional it doesn’t resolve your initial request.

    We are all a team here in EllisLab Support. Each with their own strengths. Ingmar himself has over 30,000 support replies under his belt and has been working with ExpressionEngine since 2004.

    So while there is a distinction in our titles and roles I wouldn’t necessarily underestimate any of our abilities as specialists 😊

  • #9 / Dec 07, 2010 4:32am

    Loquela

    105 posts

    Thanks John,

    I made no estimation of anybody’s abilities, you’ve made your own inferences there. 😊

    I simply pointed out a distinction in two different approaches to offering support: while one offered a (perhaps non-ideal) work-around for my conundrum that would allow me to immediatly continue my work, the other did not.

    Reading over the replies above, one could be interpreted as flippant and passive, while the other pro-active and helpful…

    It would be very frustrating, given support here is a paid service, to be constantly told to submit feature requests. Absolutely the best approach for me would be to offer alternative suggestions to overcome any “limitations” of the current system (see above for example). Although the ability to submit feature requests is a welcome facility, I would resist using it as a catch-all response when an immediate solution is not apparent to the support agent.

    Don’t get me wrong I think EE is a top-drawer application and the support is also on the whole excellent. Please just take this in the spirit it was intended, as constructive feedback. 😉

    Many thanks,

    L.

  • #10 / Dec 07, 2010 12:35pm

    Ingmar

    29245 posts

    Very good. Please post again as needed.

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases