Gossamer Forum
Home : Products : DBMan : Customization :

Search Page Problems

Quote Reply
Search Page Problems
I have a search page at www.ezfindit.com/ezbooks/test.html that works ok if a search parameter is selected. If searching for all I get a "no search terms specified" error message.

I have placed my "default.cfg" and "default.db" files in the www.ezfindit.com/test folder for reference.

Please help!
Quote Reply
Re: Search Page Problems In reply to
Good morning.

Well, I have looked at your search form and files. The main problem is that you have "" for the All field. The default value for the the All value should be ---.

What I would recommend doing is use the build_fancy_select_field mod to create your drop-down menu. If you do not use this mod, then in the form, you cannot use All. You would have to leave --- as the value. The fancy build select fields allows you to put values in your form, such as "Choose one of the following" or "Choose All".

The build_fancy_select_field routine can be placed in your html.pl file. If you are not using this mod yet and would like to, let me know and I will post the codes.

If you are using a text field for your Schools field, using the drop down menu will only allow you to use values you have entered. The best route is to use the build_select_field routine or build_fancy_select_field routine.

Does this make sense?

Regards,




------------------
Eliot Lee
Founder and Editor
Anthro TECH, L.L.C
http://www.anthrotech.com/
info@anthrotech.com
==========================
Coconino Community College
http://www.coco.cc.az.us/
Web Technology
Coordinator
elee@coco.cc.az.us
Quote Reply
Re: Search Page Problems In reply to
I tried placing "---" value for All, and I got the same error message. I have another site www.SeekHomes.com that uses "" for all in the "Find Homes" search page and that works fine.

What am I missing here?
Quote Reply
Re: Search Page Problems In reply to
On the site that "" works, how have you set up that field? Is it a text field? If you are using build_select_field for the current database you are asking about, then using "" will not work, unless you have changed the sub build_select_field in your db.cgi file.

Regards,

------------------
Eliot Lee
Founder and Editor
Anthro TECH, L.L.C
http://www.anthrotech.com/
info@anthrotech.com
==========================
Coconino Community College
http://www.coco.cc.az.us/
Web Technology
Coordinator
elee@coco.cc.az.us
Quote Reply
Re: Search Page Problems In reply to
On the site that "" works the field is setup as "alpha" the same as the one that doesn't. I am using the exact same copy of db.cgi without any changes.

I haven't changed the sub build_select_field in the db.cgi file.


Quote Reply
Re: Search Page Problems In reply to
Right...I guess you are confused about my question, which I admit may not have been clearly stated.

Please post your html.pl and default.cfg as text files and upload them to your server. Then post the URL where we can find them.

Thanks.

------------------
Eliot Lee
Founder and Editor
Anthro TECH, L.L.C
http://www.anthrotech.com/
info@anthrotech.com
==========================
Coconino Community College
http://www.coco.cc.az.us/
Web Technology
Coordinator
elee@coco.cc.az.us
Quote Reply
Re: Search Page Problems In reply to
If placed them in the following directory "www.ezfindit.com/test". I have also included a copy of the database. (default.db)

Thanks for helping me with this.
Quote Reply
Re: Search Page Problems In reply to
Okay...Now I see that for the School field, it is a TEXT field, not a select Field in your database. But you manually created a drop-down select field out of the School field, which is a TEXT field.

Again, I think that the problem is that you are converting a INPUT TYPE=TEXT field into a SELECT drop-down menu field. The only way that I think the All value will work is if you create a drop-down menu via the db_select_field function.

That seems to be the problem.

Regards,

------------------
Eliot Lee
Founder and Editor
Anthro TECH, L.L.C
http://www.anthrotech.com/
info@anthrotech.com
==========================
Coconino Community College
http://www.coco.cc.az.us/
Web Technology
Coordinator
elee@coco.cc.az.us
Quote Reply
Re: Search Page Problems In reply to
Great.

Glad you figured it out.

Regards,

------------------
Eliot Lee
Founder and Editor
Anthro TECH, L.L.C
http://www.anthrotech.com/
info@anthrotech.com
==========================
Coconino Community College
http://www.coco.cc.az.us/
Web Technology
Coordinator
elee@coco.cc.az.us
Quote Reply
Re: Search Page Problems In reply to
That wouldn't work b/c I do not autogenerate my forms.

Actually I figured out the problem by reviewing the db.cgi program. All I needed to do is add = <input type=hidden name="ID" value="*"> to my form in the search page and it now works. This takes care of the situation when the "All" option is picked with no other fields filled out.