Select to view content in your preferred language

Filter Template Web Application -- Creating Drop Down Menu as filter

2324
4
10-16-2013 12:41 PM
MichaelMorisette
Occasional Contributor
Hello

I am a GIS Technician working for the City of Fayetteville, AR.

We are trying to use the Filter Template Web App to allow a user to dynamically show different types of businesses in the city.  I was asked if I could change the input box for the dynamic filter so that it shows as a drop-down menu of the various groupings of businesses we have, instead of the text box that goes there by default.  Does anybody know of a process to accomplish this?  Is there a good way to accomplish this through other means?

It seems simple in theory, but what's actually in the code is way over my head.  I have a very limited knowledge of javascript (and coding in general), but am the best in the office for the task.  I downloaded the code, and found this from lines 104-111 of "layout.js":
/*
 *  Build the filter dialog including explanatory text and add a submit button for each filter group. 
*/
    var filterContainer = dojo.create("div",{
      id: "container",
      className: options.i18n.isRightToLeft ? 'esriRtl' : 'esriLtr',
      innerHTML: options.filterInstructions ||  options.i18n.viewer.filterInstructions
    });


I'm guessing this is the part where it makes the input box, but I have no clue how to get this to become a menu.  Any help would be much appreciated.
Tags (2)
0 Kudos
4 Replies
JasonPlummer
Emerging Contributor
Did you happen to ever figure out how to do this with the filter template app?  I am wanting to do the same as you, but the filter is always a textbox and not a dropdown.  Just wondering if i have something set up wrong.  Thanks!
0 Kudos
MichaelMorisette
Occasional Contributor
Unfortunately, I have never found a way to do this :(.  I agree that it would definitely be handy to have if possible.
0 Kudos
KatherineOConnor
Deactivated User
I would also like to know how to do this - can anyone from ESRI provide some assistance here?

Follow-up: Just found a response from ESRI in this thread:
http://forums.arcgis.com/threads/92212-filter-web-app-template


-Katherine
0 Kudos
MarissaWalter
Deactivated User

There is a new version of this template on GitHub that might help. It now has drop downs for coded value and string type layers. It replaced the static text box to a drop down menu for me after switching to the new version. 

GitHub - Esri/InteractiveFilter: Filter is a configurable application template that displays a map w...  

0 Kudos