AnsweredAssumed Answered

Modify existing search widget in WAB (text-box to drop-down List)

Question asked by fblanchard_morris_nj_us on Oct 12, 2016
Latest reply on Oct 12, 2016 by fblanchard_morris_nj_us

Hello,

I would like to modify the Search Widget available in WAB so that I can select values within a layer.

I currently have the search box set up to search a layer by the field "name" when typed in the text box, but I would like these names available in a drop-down menu.  I have attempted to rearrange code and use bits from other widgets that contain drop-downs but I receive errors.

 

Current html code for search widget (out of the box from ESRI):

<div>
<div data-dojo-attach-point="searchNode" class="search-node"></div>
<div data-dojo-attach-point="searchResultsNode" class="searchResults arcgisSearch"></div>
</div>

 

Code containing the drop-down function (from eSearch widget by Robert Scheitlin, GISP) :

<select class="esearch-select" style="margin-bottom:10px;float:left;"
data-dojo-attach-point="selectLayerGraphical" data-dojo-type="dijit/form/Select"></select>
<div data-dojo-type="dijit/form/DropDownButton" data-dojo-attach-point="gSelectType" iconclass="newSelIcon"
class="selectionmenu"><span></span>

 

How would I be able to use the 2nd to modify the 1st?..correctly

 

Thank you!

Outcomes