Page 1 of 1

Checkbox replaced by select field in search tab

PostPosted: Tue Aug 14, 2012 1:42 pm
by nusskratzer
Hello,

I defined the field "myfield" to be a checkbox as follows:

fields.ini:
[myfield]
widget:type=checkbox
vocabulary=myfieldvoc
visibility:find=visible


valuelists.ini:
[myfieldvoc]
__sql__ = "SELECT myfield FROM mytable ORDER BY myfield"

This does appear as checkbox field in the edit tab, but is replaced by a select field in the search tab. Why and how can I get a checkbox field in the search tab as well?

Thanks for your help!




~

Re: Checkbox replaced by select field in search tab

PostPosted: Mon Aug 20, 2012 11:01 am
by shannah
Checkboxes in the search are a little trickier because when searching on a field that uses a checkbox for input, there are actually 3 different options for searching:
1. Checked
2. Unchecked
3. Don't care

Any field that uses a vocabulary automatically uses a select widget in the find tab also.

You can try to override this with:

widget:find:vocabulary=""

But I'm not sure if this will work.