I made a copy of the Search widget to use on a different layer. I renamed the copy Search.js file to Search2.js, Search.html to Search2.html and referenced it like so in config/viewer.js:
search2: {
include: true,
id: 'search2',
type: 'titlePane',
canFloat: true,
path: 'gis/dijit/Search2',
title: 'Find Precinct',
open: true,
position: 3,
options: {
map: true,
mapClickMode: true,
mapRightClickMenu: true
}
},
I changed the id of the selection box in the js and html copies to "mySelectp."
I get an error in the browser:
dojo/parser::parse() error Error: Tried to register widget with id==mySelect but that id is already registered
I can't figure out why the Search2 widget is seemingly still trying to reference the element with id==mySelect, instead of the renamed id==mySelectp.