<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>idea Popup Template Formatter Enhancements in Developers Ideas</title>
    <link>https://community.esri.com/t5/developers-ideas/popup-template-formatter-enhancements/idi-p/922726</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A class="link-titled" href="https://developers.arcgis.com/javascript/3/jshelp/intro_popuptemplate.html" title="https://developers.arcgis.com/javascript/3/jshelp/intro_popuptemplate.html"&gt;Format Popup Content | Guide | ArcGIS API for JavaScript 3.18&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This page describe the details on formatting a popup using several different properties. The popup template is fairly flexible, but enhancements could be made to make it a lot&amp;nbsp;&lt;EM&gt;more&lt;/EM&gt; useful, with&amp;nbsp;minimal&amp;nbsp;effort.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Add the ability to provide a custom formatter for any field, not just date and number types. The formatter property already exists, but it doesn't allow any real customizing for formatting values...&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Yes, I can provide a content property, that will allow me to do this, but if I simply want to turn one field into a link, now I have to write an entire template up that looks like a table and then format the one field that I want into a link.&amp;nbsp;&lt;/LI&gt;&lt;LI&gt;Yes, links are already automatically converted into anchors, BUT not if they are missing http or require multiple fields to build...&lt;/LI&gt;&lt;LI&gt;Additionally, it would be ideal if this formatter was a function that could utilize other fields to build a formatted value.&lt;/LI&gt;&lt;LI&gt;Example:&lt;/LI&gt;&lt;LI&gt;function(value, otherAttributes){ return lang.replace('&amp;lt;a href="fieldName"&amp;gt;{otherFieldName}&amp;lt;/a&amp;gt;', attributes); }&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This would allow the most flexibility and since I'm using a dojo template above, it would be easy to read and set up.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As I mentioned, the formatter property already exists, it just needs to be tweaked to be more flexible, and allow for other attributes to be used in the formatter function.&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 07 Oct 2016 20:25:56 GMT</pubDate>
    <dc:creator>roemhildtg</dc:creator>
    <dc:date>2016-10-07T20:25:56Z</dc:date>
    <item>
      <title>Popup Template Formatter Enhancements</title>
      <link>https://community.esri.com/t5/developers-ideas/popup-template-formatter-enhancements/idi-p/922726</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A class="link-titled" href="https://developers.arcgis.com/javascript/3/jshelp/intro_popuptemplate.html" title="https://developers.arcgis.com/javascript/3/jshelp/intro_popuptemplate.html"&gt;Format Popup Content | Guide | ArcGIS API for JavaScript 3.18&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This page describe the details on formatting a popup using several different properties. The popup template is fairly flexible, but enhancements could be made to make it a lot&amp;nbsp;&lt;EM&gt;more&lt;/EM&gt; useful, with&amp;nbsp;minimal&amp;nbsp;effort.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Add the ability to provide a custom formatter for any field, not just date and number types. The formatter property already exists, but it doesn't allow any real customizing for formatting values...&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Yes, I can provide a content property, that will allow me to do this, but if I simply want to turn one field into a link, now I have to write an entire template up that looks like a table and then format the one field that I want into a link.&amp;nbsp;&lt;/LI&gt;&lt;LI&gt;Yes, links are already automatically converted into anchors, BUT not if they are missing http or require multiple fields to build...&lt;/LI&gt;&lt;LI&gt;Additionally, it would be ideal if this formatter was a function that could utilize other fields to build a formatted value.&lt;/LI&gt;&lt;LI&gt;Example:&lt;/LI&gt;&lt;LI&gt;function(value, otherAttributes){ return lang.replace('&amp;lt;a href="fieldName"&amp;gt;{otherFieldName}&amp;lt;/a&amp;gt;', attributes); }&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This would allow the most flexibility and since I'm using a dojo template above, it would be easy to read and set up.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As I mentioned, the formatter property already exists, it just needs to be tweaked to be more flexible, and allow for other attributes to be used in the formatter function.&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Oct 2016 20:25:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/developers-ideas/popup-template-formatter-enhancements/idi-p/922726</guid>
      <dc:creator>roemhildtg</dc:creator>
      <dc:date>2016-10-07T20:25:56Z</dc:date>
    </item>
  </channel>
</rss>

