Checkbox replaced by select field in search tab

A place for users and developers of the Xataface to discuss and receive support.

Checkbox replaced by select field in search tab

Postby nusskratzer » Tue Aug 14, 2012 1:42 pm

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!




~
nusskratzer
 
Posts: 4
Joined: Tue Aug 14, 2012 1:34 pm

Re: Checkbox replaced by select field in search tab

Postby shannah » Mon Aug 20, 2012 11:01 am

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.
shannah
 
Posts: 4457
Joined: Wed Dec 31, 1969 5:00 pm


Return to Xataface Users

Who is online

Users browsing this forum: No registered users and 27 guests

cron
Powered by Dataface
© 2005-2007 Steve Hannah All rights reserved