You are using a browser that is no longer supported. Please use the latest version of Google Chrome, Mozilla Firefox, Apple Safari, or Microsoft Edge. For more information please see the System Requirements.
Skip To ContentArcGIS for DevelopersSign In Dashboard

Note: Support for 3D on mobile devices may vary, view the system requirements for more information.

This sample demonstrates how to work with custom content elements within the PopupTemplate's content. There are five types of popup elements: fields, media, text, attachments, and custom. The custom content elements is set via the creator property. This property passes in a function which returns either a: String, HTMLElement, Widget, or Promise.

This particular sample shows how to set two types of custom content in the PopupTemplate's content. The first contains a Search widget. The second is a promise resulting from a QueryTask.

Click on a state within the map to display the popup. Notice that these two elements display. It is possible to search for another state within the Search widget. It will zoom to the selected feature and update the existing popupTemplate with that state's information.

Sample search results