Advanced Search function dropdown

Advanced Search function dropdown

by Stuart Watson -
Number of replies: 2

Hi

Is there a way to cusomtise the Advanced search feature in the database module to create dropdown menus which can be automatically populated with options from the database?

All information in the database is uploaded from csv and I would like the search function to produce a dropdown list of locations which appear in a certain field.

I have tried usoing the menu option but this needs the options to be predefined prior to uploading.  I envisage something like the autofilter function in Excel.

Is it possible using the Javascript template to expand the field arrays which are produced?

I'm fairly new to programming, so if anybody could talk me through this or give me a broken down example of this I would be most appreciative.

Average of ratings: -
In reply to Stuart Watson

Re: Advanced Search function dropdown

by Frank Ralf -
Hi Stuart,

AFAIK this should already be the default behavior of advanced search. However, there are some issues in the Moodle Tracker which suggest that there might be some problems with certain types of the underlying database system (MySQL, Oracle, etc.)

hth
Frank
In reply to Frank Ralf

Re: Advanced Search function dropdown

by Stuart Watson -

This still doesn't work.  I think you've misunterstood the query.

I have a database of locations around the world, with up to 30 per country, uploaded into the database module to create a directory. 

I want to be able to use the advanced search function to search through these, but instead of the user having to type the country they are looking for, they can select it from a drop-down list.

I have tried using 'menu' as a field type either to hold the information or just to hold the array Counrty  but either way the information is not transferring to the dropdown and it appears blank.

Any ideas anyone?