Remove Attachments Tag From PopupTemplate

922
5
Jump to solution
05-24-2017 10:13 AM
LloydBronn
Occasional Contributor II

I have a popuptemplate that displays a chart attachment for a feature. Is there a way to remove the text "Attachments:" from the popup and just show the attachment?

0 Kudos
1 Solution

Accepted Solutions
KellyHutchins
Esri Frequent Contributor

With the popup attachments it is slightly different try this css. 

      .attachmentsSection div:first-child{
        display:none;
      }

View solution in original post

5 Replies
RobertScheitlin__GISP
MVP Emeritus

Lloyd,

   You will have to do this through direct DOM manipulation:

map.infoWindow.on("selection-change", function(){
  setTimeout(function(){
    var node = query(".attachmentsSection")[0];
    domStyle.set(node.children[0], "display", "none");
  }, 100);
});
KellyHutchins
Esri Frequent Contributor

You could also try using the following css to hide the 'Attachment's text. 

.attachmentEditor > div > b {
    display: none;
}‍‍‍
LloydBronn
Occasional Contributor II

This didn't work. I'm not using an info template, just the popup template. 

var popupTemplate = new PopupTemplate({
            showAttachments: true
          }); 
0 Kudos
KellyHutchins
Esri Frequent Contributor

With the popup attachments it is slightly different try this css. 

      .attachmentsSection div:first-child{
        display:none;
      }
LloydBronn
Occasional Contributor II

Thanks!

0 Kudos