Gossamer Forum
Home : Products : DBMan : Customization :

Problem with Alphabetical Drop-Down Menus

Quote Reply
Problem with Alphabetical Drop-Down Menus
I noticed that in our Employee Directory that the first value of all the selected fields appears at the end of the list. I would like the selected fields to be alphabetized.

Here is what I have in the default.cfg file in the %db_select_fields section:

# Select fields. Field name => 'comma seperated list of drop down options'.
%db_select_fields = (
AcadArea => 'Accounting, Administration of Justice, Allied Health Sciences, American Sign Language, Anthropology, Armed Forces, Automotive, Aviation, Biology, Business, Chemistry, Computer Information Systems, Cooperative Education, Counseling, Dance, Drafting, Economics, Electronics, Emergency Medical Services, Education, English, Environmental Studies, Fine Arts, Fire Science, French, Geography, Geology, German, History, Hotel Restaurant Management, Industrial Technology, Humanities, Languages, Leadership, Manufacturing Industrial Technology, Mathematics, Music, Music Performance, Navajo, Nursing, Nutrition, Office Information Systems, Philosophy, Physical Education, Physics, Political Science, Psychology, Real Estate, Recreation, Science, Sociology, Spanish, Speech, Theatre',
Department => 'Accounting and Budget, Admissions and Records, Continuing Education, CCC-NAU Office, College Store, Curriculum, Facilities Management, Faculty Support, Financial Aid, Human Resources, Information Technology, Learning Enhancement Center, Office of the President, Office of the VP for Administrative Support, Office of the VP for Educational Services, Page Dean Office, Public Information and Relations, Purchasing and Special Projects, Receptionist, Small Business Development Center, Student Employment Services, School-to-Work, Vocational Counseling',
Employee_Type => 'Associate Faculty, Faculty, Staff',
Location => 'Flagstaff Campus, Grand Canyon, Page Campus,Williams'
);


Anyone have an idea on how to make the first value of the selected fields appear at the top of the list???

To see this in action, go to

http://www.coco.cc.az.us/cgi-bin/dbman/db.cgi

-OR-

http://www.coco.cc.az.us/cgi-bin/jobline/


------------------
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

[This message has been edited by Eliot (edited May 07, 1999).]

[This message has been edited by Eliot (edited May 07, 1999).]

[This message has been edited by Eliot (edited May 07, 1999).]
Quote Reply
Re: Problem with Alphabetical Drop-Down Menus In reply to
Take out the spaces between the options.

You have

Accounting, Administration of Justice, Allied Health Sciences,

You need to have

Accounting,Administration of Justice,Allied Health Sciences,

I'm surprised that it's sorting, though. I've always seen it just keep things in the order they are. But try taking out the spaces and see what happens.


------------------
JPD





Quote Reply
Re: Problem with Alphabetical Drop-Down Menus In reply to
It worked! It is weird because I did take out the spaces a week ago and I was still getting the first value at the end of the selected field. But it works fine on both scripts.

------------------
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: Problem with Alphabetical Drop-Down Menus In reply to
It just took a little "JPD" magic to get it to work!



------------------
JPD





Quote Reply
Re: Problem with Alphabetical Drop-Down Menus In reply to
Thank you very much! I appreciate your support and guidance.

------------------
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