popupTemplate Change Attachment Display Text

402
2
08-22-2017 09:39 AM
deleted-user-1_r2dgYuILKY
Occasional Contributor III

I have a popup template that is set to show attachments from the feature layer. The popup displays the attachment as a hyperlink with the name of the source file on the ArcGIS Server, like: this_is_the_file.pngIs it possible to change this in the popup template to a generic text that points to the attachment, like I would with a URL hyperlink? 

var popupTemplate = new PopupTemplate({
            title: "Forecast Analysis",
            fieldInfos: [
              {
                fieldName: "Name",
                visible: true,
                label: "Location"
              },
                 {
                fieldName: "Lat",
                visible: true,
                label: "Latitude"
              },
              {
                fieldName: "Lon",
                visible: true,
                label: "Longitude",
              }
            ],
            showAttachments: true
          });
0 Kudos
2 Replies
RobertScheitlin__GISP
MVP Emeritus

Levi,

  There is no configuration setting to control what you are wanting. The only way would be through direct Dom manipulation in your code to query for the correct classes in the Dom and then set the innerHtml of that Anchor element to something else.

0 Kudos
deleted-user-1_r2dgYuILKY
Occasional Contributor III

OK. Thanks!

0 Kudos