WebGUI
      Click here to register.
      
Sprechen Sie WebGUI? Parlez vous WebGUI? Se habla WebGUI? Spreekt u WebGUI?

Do you speak WebGUI? Please help us translate WebGUI into your language.



     Report a Bug > WebGUI Bug Tracker

Thingy Search Fields don't correspond with the Field Type.

User charleyhankins
Date 5/5/2008 1:20 pm
Severity Critical (mostly not working)
Version WebGUI Beta
Views 106
Rating 0    Rate [
|
]
Karma Rank 0.000000
Previous · Next
User Message
charleyhankins

I am using 7.5.10-beta.

The input type for a field when under "search" does not correspond with the type of field selected for it.

For example, I created a field called "categories".  I selected list box as my field type.  I then populated it with several entries.

When I want to search by "category" the search field is a text box, not a list box (or any other type of field that I select). 

http://web402.plainblack.net/home/great-place-to-live/chamber-of-commerce/membership

I have selected other type of formats for the field, but when in the search template it always reverts to a text box.

I assume these lines in the Search Template are supposed to direct that action. 

<tmpl_if searchFields_isOtherThing>
 <tmpl_var searchFields_Form>
<tmpl_else>
 <tmpl_var searchFields_textForm>
</tmpl_if>

If I am wrong about this being a bug, please forgive me.  It seems like it should work that way.



Back to Top
Rate [
|
]
 
 
zzois
I can confirm this one - but on the other hand this behaviour might be a feature not a bug as one might want to search for hits by typing keywords in search box, rather than being forced to go through (hundreds?) of possible keywords and check them one-by-one...

Back to Top
Rate [
|
]
 
 
charleyhankins

That's a good point.  Then again, people are generally lazy and would rather have a choice to select from rather than think about what they are searching for themselves.  ;-) 

Perhaps one could have the option to make a search field the same type as the input field or a text box.  Or how about an overall search box that searches all of the fields in addition to the other search boxes?  But that may be a bit much.

 



Back to Top
Rate [
|
]
 
 
yhkhoe

This is not a bug.

Perhaps one could have the option to make a search field the same type as the input field or a text box. 

Have you read the Help for the search template? It says:

searchFields_form

A form element corresponding to this fields fieldType to search this field.

searchFields_textForm

A text input to search this field.

This gives you exactly the option you propose. If you use searchFields_form you get the same form element as the input field. If you use searchFields_textForm you get a text box.

So, in the default search template, all field types get a text box except for the otherThing field type. You can use this tmpl_var to indicate which searchable fields have the same type as their input field and which use a text box:

searchFields_is__fieldType__

A boolean indicating wether this field is of type __fieldType__. The first letter of __fieldType__ is always uppercase. Example: for a select box the value of <tmpl_var searchFields_isSelectBox> is true.

If you have a lot of fields that use the input field type and also a lot that use a text box, then the template will get a little complicated. But i think in most cases only a few fields will be searchable.

I realise that this might not all be clear at first glance. So i'm open to suggestions to improve the explanation in the search template Help.

Yung



Back to Top
Rate [
|
]
 
 
charleyhankins

Where can I find the Help for the search template?

I changed the field and it comes up as a category, but only allows 256 characters.  Is that number specified in the db?  I need much more room than that.  I have a very lengthy category list.  How can I change that field to be virtually unlimited?

Thanks,

CH

 



Back to Top
Rate [
|
]
 
 
yhkhoe

Where can I find the Help for the search template?

Just look for it in the help index.

I changed the field and it comes up as a category, but only allows 256 characters.  Is that number specified in the db?  I need much more room than that.  How can I change that field to be virtually unlimited?

Is this what you mean:

http://www.webgui.org/bugs/tracker/thingy-thing-checkbox/checklist/selectbox/selectlist-limitations#8SQzMhfEqNTzpqDDRU7tXA

 

 



Back to Top
Rate [
|
]
 
 
charleyhankins

Thanks!  So we should expect 7.5.11 soon where this issue will be resolved. 

Do you know when that will be?  The reason I ask is that we are launching this city/municipal site this coming Tuesday.  I am on a WebGUI server, so I can't access the db to apply that db fix.  Do you have any suggestions on how to remedy this issue before our launch on Tuesday?

Thanks for your help!  =D

CH

 



Back to Top
Rate [
|
]
 
 
zzois

The thread to which Yung gave you the link to, also quotes the solution you need to get rid of 256 characters input limit - all you have to do is update the appropriate table:

alter table Thingy_fields modify possibleValues text;

The very same thread also gives you a hint to when to expect the new beta version: in a week or two.

;-)

P.S.: I apologize for overlooking the fact that you don't have direct access to database... Maybe you can try to write appropriate SQLForm and do the update that way!?



Back to Top
Rate [
|
]