<?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>topic Re: User-definable default values in popup while editing? in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/user-definable-default-values-in-popup-while/m-p/324923#M29937</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Zoe,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; Here is what I use to auto-populate a field:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;this.editor.templatePicker.on("selection-change", lang.hitch(this, function() {&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var selected = this.editor.templatePicker.getSelected();&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (selected) {&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var featureLayer = selected.featureLayer;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; on.once(featureLayer, "before-apply-edits", lang.hitch(this, function(evt){&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(evt.adds &amp;amp;&amp;amp; evt.adds.length &amp;gt; 0){&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(evt.adds[0].attributes.hasOwnProperty('Begin_Date_Occ')){&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; evt.adds[0].attributes.Begin_Date_Occ = new Date(Date.now());&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; this.editor.attributeInspector.refresh();&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }));&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }));&lt;/PRE&gt;&lt;OL class="dp-c" start="1" style="padding-left: 0px; border: none; font-size: 12px; font-family: Consolas, 'Courier New', Courier, mono, serif; vertical-align: baseline; color: #5c5c5c; margin-bottom: 1px !important; margin-left: 45px !important; outline: 0px !important; background-color: #ffffff;"&gt;&lt;LI class="alt" style="border-left-width: 3px; border-style: none none none solid; border-left-color: #6ce26c; font-weight: inherit; font-style: inherit; font-family: inherit; vertical-align: baseline; position: relative; list-style: decimal-leading-zero outside; min-height: 0px; color: inherit; line-height: 12pt; height: auto; word-wrap: break-word; margin-top: 0px !important; margin-bottom: 0px !important; padding-right: 3px !important; padding-left: 10px !important; outline: 0px !important;"&gt;&lt;SPAN style="margin: 0px; padding: 0px; border: 0px; font-weight: inherit; font-style: inherit; vertical-align: baseline; color: black; font-size: 9pt !important; outline: 0px !important; background-color: inherit;"&gt;&lt;SPAN class="keyword" style="margin: 0px; padding: 0px; border: 0px; font-weight: inherit; font-style: inherit; vertical-align: baseline; color: #006699; font-size: 9pt !important; outline: 0px !important; background-color: inherit;"&gt;this&lt;/SPAN&gt;&lt;SPAN style="margin: 0px; padding: 0px; border: 0px; font-weight: inherit; font-style: inherit; vertical-align: baseline; font-size: 9pt !important; outline: 0px !important; background-color: inherit;"&gt;.editor.templatePicker.on(&lt;/SPAN&gt;&lt;SPAN class="string" style="margin: 0px; padding: 0px; border: 0px; font-weight: inherit; font-style: inherit; vertical-align: baseline; color: blue; font-size: 9pt !important; outline: 0px !important; background-color: inherit;"&gt;"selection-change"&lt;/SPAN&gt;&lt;SPAN style="margin: 0px; padding: 0px; border: 0px; font-weight: inherit; font-style: inherit; vertical-align: baseline; font-size: 9pt !important; outline: 0px !important; background-color: inherit;"&gt;, lang.hitch(&lt;/SPAN&gt;&lt;SPAN class="keyword" style="margin: 0px; padding: 0px; border: 0px; font-weight: inherit; font-style: inherit; vertical-align: baseline; color: #006699; font-size: 9pt !important; outline: 0px !important; background-color: inherit;"&gt;this&lt;/SPAN&gt;&lt;SPAN style="margin: 0px; padding: 0px; border: 0px; font-weight: inherit; font-style: inherit; vertical-align: baseline; font-size: 9pt !important; outline: 0px !important; background-color: inherit;"&gt;, &lt;/SPAN&gt;&lt;SPAN class="keyword" style="margin: 0px; padding: 0px; border: 0px; font-weight: inherit; font-style: inherit; vertical-align: baseline; color: #006699; font-size: 9pt !important; outline: 0px !important; background-color: inherit;"&gt;function&lt;/SPAN&gt;&lt;SPAN style="margin: 0px; padding: 0px; border: 0px; font-weight: inherit; font-style: inherit; vertical-align: baseline; font-size: 9pt !important; outline: 0px !important; background-color: inherit;"&gt;() {&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI style="border-left-width: 3px; border-style: none none none solid; border-left-color: #6ce26c; font-weight: inherit; font-style: inherit; font-family: inherit; vertical-align: baseline; position: relative; list-style: decimal-leading-zero outside; min-height: 0px; line-height: 12pt; height: auto; word-wrap: break-word; margin-top: 0px !important; margin-bottom: 0px !important; padding-right: 3px !important; padding-left: 10px !important; outline: 0px !important; background-color: #f6f6f6;"&gt;&lt;SPAN style="margin: 0px; padding: 0px; border: 0px; font-weight: inherit; font-style: inherit; vertical-align: baseline; color: black; font-size: 9pt !important; outline: 0px !important; background-color: inherit;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="keyword" style="margin: 0px; padding: 0px; border: 0px; font-weight: inherit; font-style: inherit; vertical-align: baseline; color: #006699; font-size: 9pt !important; outline: 0px !important; background-color: inherit;"&gt;var&lt;/SPAN&gt;&lt;SPAN style="margin: 0px; padding: 0px; border: 0px; font-weight: inherit; font-style: inherit; vertical-align: baseline; font-size: 9pt !important; outline: 0px !important; background-color: inherit;"&gt; selected = &lt;/SPAN&gt;&lt;SPAN class="keyword" style="margin: 0px; padding: 0px; border: 0px; font-weight: inherit; font-style: inherit; vertical-align: baseline; color: #006699; font-size: 9pt !important; outline: 0px !important; background-color: inherit;"&gt;this&lt;/SPAN&gt;&lt;SPAN style="margin: 0px; padding: 0px; border: 0px; font-weight: inherit; font-style: inherit; vertical-align: baseline; font-size: 9pt !important; outline: 0px !important; background-color: inherit;"&gt;.editor.templatePicker.getSelected();&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI class="alt" style="border-left-width: 3px; border-style: none none none solid; border-left-color: #6ce26c; font-weight: inherit; font-style: inherit; font-family: inherit; vertical-align: baseline; position: relative; list-style: decimal-leading-zero outside; min-height: 0px; color: inherit; line-height: 12pt; height: auto; word-wrap: break-word; margin-top: 0px !important; margin-bottom: 0px !important; padding-right: 3px !important; padding-left: 10px !important; outline: 0px !important;"&gt;&lt;SPAN style="margin: 0px; padding: 0px; border: 0px; font-weight: inherit; font-style: inherit; vertical-align: baseline; color: black; font-size: 9pt !important; outline: 0px !important; background-color: inherit;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="keyword" style="margin: 0px; padding: 0px; border: 0px; font-weight: inherit; font-style: inherit; vertical-align: baseline; color: #006699; font-size: 9pt !important; outline: 0px !important; background-color: inherit;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="margin: 0px; padding: 0px; border: 0px; font-weight: inherit; font-style: inherit; vertical-align: baseline; font-size: 9pt !important; outline: 0px !important; background-color: inherit;"&gt; (selected) {&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI style="border-left-width: 3px; border-style: none none none solid; border-left-color: #6ce26c; font-weight: inherit; font-style: inherit; font-family: inherit; vertical-align: baseline; position: relative; list-style: decimal-leading-zero outside; min-height: 0px; line-height: 12pt; height: auto; word-wrap: break-word; margin-top: 0px !important; margin-bottom: 0px !important; padding-right: 3px !important; padding-left: 10px !important; outline: 0px !important; background-color: #f6f6f6;"&gt;&lt;SPAN style="margin: 0px; padding: 0px; border: 0px; font-weight: inherit; font-style: inherit; vertical-align: baseline; color: black; font-size: 9pt !important; outline: 0px !important; background-color: inherit;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="keyword" style="margin: 0px; padding: 0px; border: 0px; font-weight: inherit; font-style: inherit; vertical-align: baseline; color: #006699; font-size: 9pt !important; outline: 0px !important; background-color: inherit;"&gt;var&lt;/SPAN&gt;&lt;SPAN style="margin: 0px; padding: 0px; border: 0px; font-weight: inherit; font-style: inherit; vertical-align: baseline; font-size: 9pt !important; outline: 0px !important; background-color: inherit;"&gt; featureLayer = selected.featureLayer;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI class="alt" style="border-left-width: 3px; border-style: none none none solid; border-left-color: #6ce26c; font-weight: inherit; font-style: inherit; font-family: inherit; vertical-align: baseline; position: relative; list-style: decimal-leading-zero outside; min-height: 0px; color: inherit; line-height: 12pt; height: auto; word-wrap: break-word; margin-top: 0px !important; margin-bottom: 0px !important; padding-right: 3px !important; padding-left: 10px !important; outline: 0px !important;"&gt;&lt;SPAN style="margin: 0px; padding: 0px; border: 0px; font-weight: inherit; font-style: inherit; vertical-align: baseline; color: black; font-size: 9pt !important; outline: 0px !important; background-color: inherit;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; on.once(featureLayer, &lt;SPAN class="string" style="margin: 0px; padding: 0px; border: 0px; font-weight: inherit; font-style: inherit; vertical-align: baseline; color: blue; font-size: 9pt !important; outline: 0px !important; background-color: inherit;"&gt;"before-apply-edits"&lt;/SPAN&gt;&lt;SPAN style="margin: 0px; padding: 0px; border: 0px; font-weight: inherit; font-style: inherit; vertical-align: baseline; font-size: 9pt !important; outline: 0px !important; background-color: inherit;"&gt;, lang.hitch(&lt;/SPAN&gt;&lt;SPAN class="keyword" style="margin: 0px; padding: 0px; border: 0px; font-weight: inherit; font-style: inherit; vertical-align: baseline; color: #006699; font-size: 9pt !important; outline: 0px !important; background-color: inherit;"&gt;this&lt;/SPAN&gt;&lt;SPAN style="margin: 0px; padding: 0px; border: 0px; font-weight: inherit; font-style: inherit; vertical-align: baseline; font-size: 9pt !important; outline: 0px !important; background-color: inherit;"&gt;, &lt;/SPAN&gt;&lt;SPAN class="keyword" style="margin: 0px; padding: 0px; border: 0px; font-weight: inherit; font-style: inherit; vertical-align: baseline; color: #006699; font-size: 9pt !important; outline: 0px !important; background-color: inherit;"&gt;function&lt;/SPAN&gt;&lt;SPAN style="margin: 0px; padding: 0px; border: 0px; font-weight: inherit; font-style: inherit; vertical-align: baseline; font-size: 9pt !important; outline: 0px !important; background-color: inherit;"&gt;(evt){&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI style="border-left-width: 3px; border-style: none none none solid; border-left-color: #6ce26c; font-weight: inherit; font-style: inherit; font-family: inherit; vertical-align: baseline; position: relative; list-style: decimal-leading-zero outside; min-height: 0px; line-height: 12pt; height: auto; word-wrap: break-word; margin-top: 0px !important; margin-bottom: 0px !important; padding-right: 3px !important; padding-left: 10px !important; outline: 0px !important; background-color: #f6f6f6;"&gt;&lt;SPAN style="margin: 0px; padding: 0px; border: 0px; font-weight: inherit; font-style: inherit; vertical-align: baseline; color: black; font-size: 9pt !important; outline: 0px !important; background-color: inherit;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="keyword" style="margin: 0px; padding: 0px; border: 0px; font-weight: inherit; font-style: inherit; vertical-align: baseline; color: #006699; font-size: 9pt !important; outline: 0px !important; background-color: inherit;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="margin: 0px; padding: 0px; border: 0px; font-weight: inherit; font-style: inherit; vertical-align: baseline; font-size: 9pt !important; outline: 0px !important; background-color: inherit;"&gt;(evt.adds &amp;amp;&amp;amp; evt.adds.length &amp;gt; &lt;/SPAN&gt;&lt;SPAN class="number" style="margin: 0px; padding: 0px; border: 0px; font-weight: inherit; font-style: inherit; vertical-align: baseline; color: green; font-size: 9pt !important; outline: 0px !important; background-color: inherit;"&gt;0&lt;/SPAN&gt;&lt;SPAN style="margin: 0px; padding: 0px; border: 0px; font-weight: inherit; font-style: inherit; vertical-align: baseline; font-size: 9pt !important; outline: 0px !important; background-color: inherit;"&gt;){&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI class="alt" style="border-left-width: 3px; border-style: none none none solid; border-left-color: #6ce26c; font-weight: inherit; font-style: inherit; font-family: inherit; vertical-align: baseline; position: relative; list-style: decimal-leading-zero outside; min-height: 0px; color: inherit; line-height: 12pt; height: auto; word-wrap: break-word; margin-top: 0px !important; margin-bottom: 0px !important; padding-right: 3px !important; padding-left: 10px !important; outline: 0px !important;"&gt;&lt;SPAN style="margin: 0px; padding: 0px; border: 0px; font-weight: inherit; font-style: inherit; vertical-align: baseline; color: black; font-size: 9pt !important; outline: 0px !important; background-color: inherit;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="keyword" style="margin: 0px; padding: 0px; border: 0px; font-weight: inherit; font-style: inherit; vertical-align: baseline; color: #006699; font-size: 9pt !important; outline: 0px !important; background-color: inherit;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="margin: 0px; padding: 0px; border: 0px; font-weight: inherit; font-style: inherit; vertical-align: baseline; font-size: 9pt !important; outline: 0px !important; background-color: inherit;"&gt;(evt.adds[&lt;/SPAN&gt;&lt;SPAN class="number" style="margin: 0px; padding: 0px; border: 0px; font-weight: inherit; font-style: inherit; vertical-align: baseline; color: green; font-size: 9pt !important; outline: 0px !important; background-color: inherit;"&gt;0&lt;/SPAN&gt;&lt;SPAN style="margin: 0px; padding: 0px; border: 0px; font-weight: inherit; font-style: inherit; vertical-align: baseline; font-size: 9pt !important; outline: 0px !important; background-color: inherit;"&gt;].attributes.hasOwnProperty(&lt;/SPAN&gt;&lt;SPAN class="string" style="margin: 0px; padding: 0px; border: 0px; font-weight: inherit; font-style: inherit; vertical-align: baseline; color: blue; font-size: 9pt !important; outline: 0px !important; background-color: inherit;"&gt;'Begin_Date_Occ'&lt;/SPAN&gt;&lt;SPAN style="margin: 0px; padding: 0px; border: 0px; font-weight: inherit; font-style: inherit; vertical-align: baseline; font-size: 9pt !important; outline: 0px !important; background-color: inherit;"&gt;)){&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI style="border-left-width: 3px; border-style: none none none solid; border-left-color: #6ce26c; font-weight: inherit; font-style: inherit; font-family: inherit; vertical-align: baseline; position: relative; list-style: decimal-leading-zero outside; min-height: 0px; line-height: 12pt; height: auto; word-wrap: break-word; margin-top: 0px !important; margin-bottom: 0px !important; padding-right: 3px !important; padding-left: 10px !important; outline: 0px !important; background-color: #f6f6f6;"&gt;&lt;SPAN style="margin: 0px; padding: 0px; border: 0px; font-weight: inherit; font-style: inherit; vertical-align: baseline; color: black; font-size: 9pt !important; outline: 0px !important; background-color: inherit;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; evt.adds[&lt;SPAN class="number" style="margin: 0px; padding: 0px; border: 0px; font-weight: inherit; font-style: inherit; vertical-align: baseline; color: green; font-size: 9pt !important; outline: 0px !important; background-color: inherit;"&gt;0&lt;/SPAN&gt;&lt;SPAN style="margin: 0px; padding: 0px; border: 0px; font-weight: inherit; font-style: inherit; vertical-align: baseline; font-size: 9pt !important; outline: 0px !important; background-color: inherit;"&gt;].attributes.Begin_Date_Occ = &lt;/SPAN&gt;&lt;SPAN class="keyword" style="margin: 0px; padding: 0px; border: 0px; font-weight: inherit; font-style: inherit; vertical-align: baseline; color: #006699; font-size: 9pt !important; outline: 0px !important; background-color: inherit;"&gt;new&lt;/SPAN&gt;&lt;SPAN style="margin: 0px; padding: 0px; border: 0px; font-weight: inherit; font-style: inherit; vertical-align: baseline; font-size: 9pt !important; outline: 0px !important; background-color: inherit;"&gt; Date(Date.now());&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI class="alt" style="border-left-width: 3px; border-style: none none none solid; border-left-color: #6ce26c; font-weight: inherit; font-style: inherit; font-family: inherit; vertical-align: baseline; position: relative; list-style: decimal-leading-zero outside; min-height: 0px; color: inherit; line-height: 12pt; height: auto; word-wrap: break-word; margin-top: 0px !important; margin-bottom: 0px !important; padding-right: 3px !important; padding-left: 10px !important; outline: 0px !important;"&gt;&lt;SPAN style="margin: 0px; padding: 0px; border: 0px; font-weight: inherit; font-style: inherit; vertical-align: baseline; color: black; font-size: 9pt !important; outline: 0px !important; background-color: inherit;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&amp;nbsp; &lt;/SPAN&gt;&lt;/LI&gt;&lt;LI style="border-left-width: 3px; border-style: none none none solid; border-left-color: #6ce26c; font-weight: inherit; font-style: inherit; font-family: inherit; vertical-align: baseline; position: relative; list-style: decimal-leading-zero outside; min-height: 0px; line-height: 12pt; height: auto; word-wrap: break-word; margin-top: 0px !important; margin-bottom: 0px !important; padding-right: 3px !important; padding-left: 10px !important; outline: 0px !important; background-color: #f6f6f6;"&gt;&lt;SPAN style="margin: 0px; padding: 0px; border: 0px; font-weight: inherit; font-style: inherit; vertical-align: baseline; color: black; font-size: 9pt !important; outline: 0px !important; background-color: inherit;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="keyword" style="margin: 0px; padding: 0px; border: 0px; font-weight: inherit; font-style: inherit; vertical-align: baseline; color: #006699; font-size: 9pt !important; outline: 0px !important; background-color: inherit;"&gt;this&lt;/SPAN&gt;&lt;SPAN style="margin: 0px; padding: 0px; border: 0px; font-weight: inherit; font-style: inherit; vertical-align: baseline; font-size: 9pt !important; outline: 0px !important; background-color: inherit;"&gt;.editor.attributeInspector.refresh();&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI class="alt" style="border-left-width: 3px; border-style: none none none solid; border-left-color: #6ce26c; font-weight: inherit; font-style: inherit; font-family: inherit; vertical-align: baseline; position: relative; list-style: decimal-leading-zero outside; min-height: 0px; color: inherit; line-height: 12pt; height: auto; word-wrap: break-word; margin-top: 0px !important; margin-bottom: 0px !important; padding-right: 3px !important; padding-left: 10px !important; outline: 0px !important;"&gt;&lt;SPAN style="margin: 0px; padding: 0px; border: 0px; font-weight: inherit; font-style: inherit; vertical-align: baseline; color: black; font-size: 9pt !important; outline: 0px !important; background-color: inherit;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&amp;nbsp; &lt;/SPAN&gt;&lt;/LI&gt;&lt;LI style="border-left-width: 3px; border-style: none none none solid; border-left-color: #6ce26c; font-weight: inherit; font-style: inherit; font-family: inherit; vertical-align: baseline; position: relative; list-style: decimal-leading-zero outside; min-height: 0px; line-height: 12pt; height: auto; word-wrap: break-word; margin-top: 0px !important; margin-bottom: 0px !important; padding-right: 3px !important; padding-left: 10px !important; outline: 0px !important; background-color: #f6f6f6;"&gt;&lt;SPAN style="margin: 0px; padding: 0px; border: 0px; font-weight: inherit; font-style: inherit; vertical-align: baseline; color: black; font-size: 9pt !important; outline: 0px !important; background-color: inherit;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }));&amp;nbsp; &lt;/SPAN&gt;&lt;/LI&gt;&lt;LI class="alt" style="border-left-width: 3px; border-style: none none none solid; border-left-color: #6ce26c; font-weight: inherit; font-style: inherit; font-family: inherit; vertical-align: baseline; position: relative; list-style: decimal-leading-zero outside; min-height: 0px; color: inherit; line-height: 12pt; height: auto; word-wrap: break-word; margin-top: 0px !important; margin-bottom: 0px !important; padding-right: 3px !important; padding-left: 10px !important; outline: 0px !important;"&gt;&lt;SPAN style="margin: 0px; padding: 0px; border: 0px; font-weight: inherit; font-style: inherit; vertical-align: baseline; color: black; font-size: 9pt !important; outline: 0px !important; background-color: inherit;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&amp;nbsp; &lt;/SPAN&gt;&lt;/LI&gt;&lt;LI style="border-left-width: 3px; border-style: none none none solid; border-left-color: #6ce26c; font-weight: inherit; font-style: inherit; font-family: inherit; vertical-align: baseline; position: relative; list-style: decimal-leading-zero outside; min-height: 0px; line-height: 12pt; height: auto; word-wrap: break-word; margin-top: 0px !important; margin-bottom: 0px !important; padding-right: 3px !important; padding-left: 10px !important; outline: 0px !important; background-color: #f6f6f6;"&gt;&lt;SPAN style="margin: 0px; padding: 0px; border: 0px; font-weight: inherit; font-style: inherit; vertical-align: baseline; color: black; font-size: 9pt !important; outline: 0px !important; background-color: inherit;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }));&lt;/SPAN&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 11 Dec 2021 15:24:29 GMT</pubDate>
    <dc:creator>RobertScheitlin__GISP</dc:creator>
    <dc:date>2021-12-11T15:24:29Z</dc:date>
    <item>
      <title>User-definable default values in popup while editing?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/user-definable-default-values-in-popup-while/m-p/324922#M29936</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have successfully edited my own feature service with a web mapping application I created starting with the “Editor widget with simple toolbar” sample.&amp;nbsp; Now, I’m trying to add something extra to the new WMA and haven’t quite figured it out.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My features are points. They are all contained in one feature layer in my WMA.&amp;nbsp; When the user clicks on or adds a new point, they see a popup with seven editable attributes.&amp;nbsp; My assumption is that some users will want to add many points, but since some of the attributes will be the same for all of their points, they would want to be able to set default values for some of these attributes.&amp;nbsp; I have been able to set up text boxes in the left pane of my WMA to accept default values, now I just need to figure out how to make them show up in the popup when a user adds a new point.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Screenshot of the popup (for a point that already exists)&lt;/P&gt;&lt;P&gt;&lt;IMG alt="PopupEditing.png" class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/196106_PopupEditing.png" style="width: auto; height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;Screenshot of the left pane (for setting default values)&lt;/P&gt;&lt;P&gt;&lt;IMG alt="LeftPaneWithDefaultValues.png" class="image-2 jive-image" src="https://community.esri.com/legacyfs/online/196107_LeftPaneWithDefaultValues.png" style="width: auto; height: auto;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Apr 2016 20:04:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/user-definable-default-values-in-popup-while/m-p/324922#M29936</guid>
      <dc:creator>ZoeZaloudek</dc:creator>
      <dc:date>2016-04-25T20:04:33Z</dc:date>
    </item>
    <item>
      <title>Re: User-definable default values in popup while editing?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/user-definable-default-values-in-popup-while/m-p/324923#M29937</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Zoe,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; Here is what I use to auto-populate a field:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;this.editor.templatePicker.on("selection-change", lang.hitch(this, function() {&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var selected = this.editor.templatePicker.getSelected();&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (selected) {&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var featureLayer = selected.featureLayer;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; on.once(featureLayer, "before-apply-edits", lang.hitch(this, function(evt){&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(evt.adds &amp;amp;&amp;amp; evt.adds.length &amp;gt; 0){&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(evt.adds[0].attributes.hasOwnProperty('Begin_Date_Occ')){&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; evt.adds[0].attributes.Begin_Date_Occ = new Date(Date.now());&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; this.editor.attributeInspector.refresh();&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }));&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }));&lt;/PRE&gt;&lt;OL class="dp-c" start="1" style="padding-left: 0px; border: none; font-size: 12px; font-family: Consolas, 'Courier New', Courier, mono, serif; vertical-align: baseline; color: #5c5c5c; margin-bottom: 1px !important; margin-left: 45px !important; outline: 0px !important; background-color: #ffffff;"&gt;&lt;LI class="alt" style="border-left-width: 3px; border-style: none none none solid; border-left-color: #6ce26c; font-weight: inherit; font-style: inherit; font-family: inherit; vertical-align: baseline; position: relative; list-style: decimal-leading-zero outside; min-height: 0px; color: inherit; line-height: 12pt; height: auto; word-wrap: break-word; margin-top: 0px !important; margin-bottom: 0px !important; padding-right: 3px !important; padding-left: 10px !important; outline: 0px !important;"&gt;&lt;SPAN style="margin: 0px; padding: 0px; border: 0px; font-weight: inherit; font-style: inherit; vertical-align: baseline; color: black; font-size: 9pt !important; outline: 0px !important; background-color: inherit;"&gt;&lt;SPAN class="keyword" style="margin: 0px; padding: 0px; border: 0px; font-weight: inherit; font-style: inherit; vertical-align: baseline; color: #006699; font-size: 9pt !important; outline: 0px !important; background-color: inherit;"&gt;this&lt;/SPAN&gt;&lt;SPAN style="margin: 0px; padding: 0px; border: 0px; font-weight: inherit; font-style: inherit; vertical-align: baseline; font-size: 9pt !important; outline: 0px !important; background-color: inherit;"&gt;.editor.templatePicker.on(&lt;/SPAN&gt;&lt;SPAN class="string" style="margin: 0px; padding: 0px; border: 0px; font-weight: inherit; font-style: inherit; vertical-align: baseline; color: blue; font-size: 9pt !important; outline: 0px !important; background-color: inherit;"&gt;"selection-change"&lt;/SPAN&gt;&lt;SPAN style="margin: 0px; padding: 0px; border: 0px; font-weight: inherit; font-style: inherit; vertical-align: baseline; font-size: 9pt !important; outline: 0px !important; background-color: inherit;"&gt;, lang.hitch(&lt;/SPAN&gt;&lt;SPAN class="keyword" style="margin: 0px; padding: 0px; border: 0px; font-weight: inherit; font-style: inherit; vertical-align: baseline; color: #006699; font-size: 9pt !important; outline: 0px !important; background-color: inherit;"&gt;this&lt;/SPAN&gt;&lt;SPAN style="margin: 0px; padding: 0px; border: 0px; font-weight: inherit; font-style: inherit; vertical-align: baseline; font-size: 9pt !important; outline: 0px !important; background-color: inherit;"&gt;, &lt;/SPAN&gt;&lt;SPAN class="keyword" style="margin: 0px; padding: 0px; border: 0px; font-weight: inherit; font-style: inherit; vertical-align: baseline; color: #006699; font-size: 9pt !important; outline: 0px !important; background-color: inherit;"&gt;function&lt;/SPAN&gt;&lt;SPAN style="margin: 0px; padding: 0px; border: 0px; font-weight: inherit; font-style: inherit; vertical-align: baseline; font-size: 9pt !important; outline: 0px !important; background-color: inherit;"&gt;() {&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI style="border-left-width: 3px; border-style: none none none solid; border-left-color: #6ce26c; font-weight: inherit; font-style: inherit; font-family: inherit; vertical-align: baseline; position: relative; list-style: decimal-leading-zero outside; min-height: 0px; line-height: 12pt; height: auto; word-wrap: break-word; margin-top: 0px !important; margin-bottom: 0px !important; padding-right: 3px !important; padding-left: 10px !important; outline: 0px !important; background-color: #f6f6f6;"&gt;&lt;SPAN style="margin: 0px; padding: 0px; border: 0px; font-weight: inherit; font-style: inherit; vertical-align: baseline; color: black; font-size: 9pt !important; outline: 0px !important; background-color: inherit;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="keyword" style="margin: 0px; padding: 0px; border: 0px; font-weight: inherit; font-style: inherit; vertical-align: baseline; color: #006699; font-size: 9pt !important; outline: 0px !important; background-color: inherit;"&gt;var&lt;/SPAN&gt;&lt;SPAN style="margin: 0px; padding: 0px; border: 0px; font-weight: inherit; font-style: inherit; vertical-align: baseline; font-size: 9pt !important; outline: 0px !important; background-color: inherit;"&gt; selected = &lt;/SPAN&gt;&lt;SPAN class="keyword" style="margin: 0px; padding: 0px; border: 0px; font-weight: inherit; font-style: inherit; vertical-align: baseline; color: #006699; font-size: 9pt !important; outline: 0px !important; background-color: inherit;"&gt;this&lt;/SPAN&gt;&lt;SPAN style="margin: 0px; padding: 0px; border: 0px; font-weight: inherit; font-style: inherit; vertical-align: baseline; font-size: 9pt !important; outline: 0px !important; background-color: inherit;"&gt;.editor.templatePicker.getSelected();&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI class="alt" style="border-left-width: 3px; border-style: none none none solid; border-left-color: #6ce26c; font-weight: inherit; font-style: inherit; font-family: inherit; vertical-align: baseline; position: relative; list-style: decimal-leading-zero outside; min-height: 0px; color: inherit; line-height: 12pt; height: auto; word-wrap: break-word; margin-top: 0px !important; margin-bottom: 0px !important; padding-right: 3px !important; padding-left: 10px !important; outline: 0px !important;"&gt;&lt;SPAN style="margin: 0px; padding: 0px; border: 0px; font-weight: inherit; font-style: inherit; vertical-align: baseline; color: black; font-size: 9pt !important; outline: 0px !important; background-color: inherit;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="keyword" style="margin: 0px; padding: 0px; border: 0px; font-weight: inherit; font-style: inherit; vertical-align: baseline; color: #006699; font-size: 9pt !important; outline: 0px !important; background-color: inherit;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="margin: 0px; padding: 0px; border: 0px; font-weight: inherit; font-style: inherit; vertical-align: baseline; font-size: 9pt !important; outline: 0px !important; background-color: inherit;"&gt; (selected) {&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI style="border-left-width: 3px; border-style: none none none solid; border-left-color: #6ce26c; font-weight: inherit; font-style: inherit; font-family: inherit; vertical-align: baseline; position: relative; list-style: decimal-leading-zero outside; min-height: 0px; line-height: 12pt; height: auto; word-wrap: break-word; margin-top: 0px !important; margin-bottom: 0px !important; padding-right: 3px !important; padding-left: 10px !important; outline: 0px !important; background-color: #f6f6f6;"&gt;&lt;SPAN style="margin: 0px; padding: 0px; border: 0px; font-weight: inherit; font-style: inherit; vertical-align: baseline; color: black; font-size: 9pt !important; outline: 0px !important; background-color: inherit;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="keyword" style="margin: 0px; padding: 0px; border: 0px; font-weight: inherit; font-style: inherit; vertical-align: baseline; color: #006699; font-size: 9pt !important; outline: 0px !important; background-color: inherit;"&gt;var&lt;/SPAN&gt;&lt;SPAN style="margin: 0px; padding: 0px; border: 0px; font-weight: inherit; font-style: inherit; vertical-align: baseline; font-size: 9pt !important; outline: 0px !important; background-color: inherit;"&gt; featureLayer = selected.featureLayer;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI class="alt" style="border-left-width: 3px; border-style: none none none solid; border-left-color: #6ce26c; font-weight: inherit; font-style: inherit; font-family: inherit; vertical-align: baseline; position: relative; list-style: decimal-leading-zero outside; min-height: 0px; color: inherit; line-height: 12pt; height: auto; word-wrap: break-word; margin-top: 0px !important; margin-bottom: 0px !important; padding-right: 3px !important; padding-left: 10px !important; outline: 0px !important;"&gt;&lt;SPAN style="margin: 0px; padding: 0px; border: 0px; font-weight: inherit; font-style: inherit; vertical-align: baseline; color: black; font-size: 9pt !important; outline: 0px !important; background-color: inherit;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; on.once(featureLayer, &lt;SPAN class="string" style="margin: 0px; padding: 0px; border: 0px; font-weight: inherit; font-style: inherit; vertical-align: baseline; color: blue; font-size: 9pt !important; outline: 0px !important; background-color: inherit;"&gt;"before-apply-edits"&lt;/SPAN&gt;&lt;SPAN style="margin: 0px; padding: 0px; border: 0px; font-weight: inherit; font-style: inherit; vertical-align: baseline; font-size: 9pt !important; outline: 0px !important; background-color: inherit;"&gt;, lang.hitch(&lt;/SPAN&gt;&lt;SPAN class="keyword" style="margin: 0px; padding: 0px; border: 0px; font-weight: inherit; font-style: inherit; vertical-align: baseline; color: #006699; font-size: 9pt !important; outline: 0px !important; background-color: inherit;"&gt;this&lt;/SPAN&gt;&lt;SPAN style="margin: 0px; padding: 0px; border: 0px; font-weight: inherit; font-style: inherit; vertical-align: baseline; font-size: 9pt !important; outline: 0px !important; background-color: inherit;"&gt;, &lt;/SPAN&gt;&lt;SPAN class="keyword" style="margin: 0px; padding: 0px; border: 0px; font-weight: inherit; font-style: inherit; vertical-align: baseline; color: #006699; font-size: 9pt !important; outline: 0px !important; background-color: inherit;"&gt;function&lt;/SPAN&gt;&lt;SPAN style="margin: 0px; padding: 0px; border: 0px; font-weight: inherit; font-style: inherit; vertical-align: baseline; font-size: 9pt !important; outline: 0px !important; background-color: inherit;"&gt;(evt){&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI style="border-left-width: 3px; border-style: none none none solid; border-left-color: #6ce26c; font-weight: inherit; font-style: inherit; font-family: inherit; vertical-align: baseline; position: relative; list-style: decimal-leading-zero outside; min-height: 0px; line-height: 12pt; height: auto; word-wrap: break-word; margin-top: 0px !important; margin-bottom: 0px !important; padding-right: 3px !important; padding-left: 10px !important; outline: 0px !important; background-color: #f6f6f6;"&gt;&lt;SPAN style="margin: 0px; padding: 0px; border: 0px; font-weight: inherit; font-style: inherit; vertical-align: baseline; color: black; font-size: 9pt !important; outline: 0px !important; background-color: inherit;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="keyword" style="margin: 0px; padding: 0px; border: 0px; font-weight: inherit; font-style: inherit; vertical-align: baseline; color: #006699; font-size: 9pt !important; outline: 0px !important; background-color: inherit;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="margin: 0px; padding: 0px; border: 0px; font-weight: inherit; font-style: inherit; vertical-align: baseline; font-size: 9pt !important; outline: 0px !important; background-color: inherit;"&gt;(evt.adds &amp;amp;&amp;amp; evt.adds.length &amp;gt; &lt;/SPAN&gt;&lt;SPAN class="number" style="margin: 0px; padding: 0px; border: 0px; font-weight: inherit; font-style: inherit; vertical-align: baseline; color: green; font-size: 9pt !important; outline: 0px !important; background-color: inherit;"&gt;0&lt;/SPAN&gt;&lt;SPAN style="margin: 0px; padding: 0px; border: 0px; font-weight: inherit; font-style: inherit; vertical-align: baseline; font-size: 9pt !important; outline: 0px !important; background-color: inherit;"&gt;){&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI class="alt" style="border-left-width: 3px; border-style: none none none solid; border-left-color: #6ce26c; font-weight: inherit; font-style: inherit; font-family: inherit; vertical-align: baseline; position: relative; list-style: decimal-leading-zero outside; min-height: 0px; color: inherit; line-height: 12pt; height: auto; word-wrap: break-word; margin-top: 0px !important; margin-bottom: 0px !important; padding-right: 3px !important; padding-left: 10px !important; outline: 0px !important;"&gt;&lt;SPAN style="margin: 0px; padding: 0px; border: 0px; font-weight: inherit; font-style: inherit; vertical-align: baseline; color: black; font-size: 9pt !important; outline: 0px !important; background-color: inherit;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="keyword" style="margin: 0px; padding: 0px; border: 0px; font-weight: inherit; font-style: inherit; vertical-align: baseline; color: #006699; font-size: 9pt !important; outline: 0px !important; background-color: inherit;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="margin: 0px; padding: 0px; border: 0px; font-weight: inherit; font-style: inherit; vertical-align: baseline; font-size: 9pt !important; outline: 0px !important; background-color: inherit;"&gt;(evt.adds[&lt;/SPAN&gt;&lt;SPAN class="number" style="margin: 0px; padding: 0px; border: 0px; font-weight: inherit; font-style: inherit; vertical-align: baseline; color: green; font-size: 9pt !important; outline: 0px !important; background-color: inherit;"&gt;0&lt;/SPAN&gt;&lt;SPAN style="margin: 0px; padding: 0px; border: 0px; font-weight: inherit; font-style: inherit; vertical-align: baseline; font-size: 9pt !important; outline: 0px !important; background-color: inherit;"&gt;].attributes.hasOwnProperty(&lt;/SPAN&gt;&lt;SPAN class="string" style="margin: 0px; padding: 0px; border: 0px; font-weight: inherit; font-style: inherit; vertical-align: baseline; color: blue; font-size: 9pt !important; outline: 0px !important; background-color: inherit;"&gt;'Begin_Date_Occ'&lt;/SPAN&gt;&lt;SPAN style="margin: 0px; padding: 0px; border: 0px; font-weight: inherit; font-style: inherit; vertical-align: baseline; font-size: 9pt !important; outline: 0px !important; background-color: inherit;"&gt;)){&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI style="border-left-width: 3px; border-style: none none none solid; border-left-color: #6ce26c; font-weight: inherit; font-style: inherit; font-family: inherit; vertical-align: baseline; position: relative; list-style: decimal-leading-zero outside; min-height: 0px; line-height: 12pt; height: auto; word-wrap: break-word; margin-top: 0px !important; margin-bottom: 0px !important; padding-right: 3px !important; padding-left: 10px !important; outline: 0px !important; background-color: #f6f6f6;"&gt;&lt;SPAN style="margin: 0px; padding: 0px; border: 0px; font-weight: inherit; font-style: inherit; vertical-align: baseline; color: black; font-size: 9pt !important; outline: 0px !important; background-color: inherit;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; evt.adds[&lt;SPAN class="number" style="margin: 0px; padding: 0px; border: 0px; font-weight: inherit; font-style: inherit; vertical-align: baseline; color: green; font-size: 9pt !important; outline: 0px !important; background-color: inherit;"&gt;0&lt;/SPAN&gt;&lt;SPAN style="margin: 0px; padding: 0px; border: 0px; font-weight: inherit; font-style: inherit; vertical-align: baseline; font-size: 9pt !important; outline: 0px !important; background-color: inherit;"&gt;].attributes.Begin_Date_Occ = &lt;/SPAN&gt;&lt;SPAN class="keyword" style="margin: 0px; padding: 0px; border: 0px; font-weight: inherit; font-style: inherit; vertical-align: baseline; color: #006699; font-size: 9pt !important; outline: 0px !important; background-color: inherit;"&gt;new&lt;/SPAN&gt;&lt;SPAN style="margin: 0px; padding: 0px; border: 0px; font-weight: inherit; font-style: inherit; vertical-align: baseline; font-size: 9pt !important; outline: 0px !important; background-color: inherit;"&gt; Date(Date.now());&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI class="alt" style="border-left-width: 3px; border-style: none none none solid; border-left-color: #6ce26c; font-weight: inherit; font-style: inherit; font-family: inherit; vertical-align: baseline; position: relative; list-style: decimal-leading-zero outside; min-height: 0px; color: inherit; line-height: 12pt; height: auto; word-wrap: break-word; margin-top: 0px !important; margin-bottom: 0px !important; padding-right: 3px !important; padding-left: 10px !important; outline: 0px !important;"&gt;&lt;SPAN style="margin: 0px; padding: 0px; border: 0px; font-weight: inherit; font-style: inherit; vertical-align: baseline; color: black; font-size: 9pt !important; outline: 0px !important; background-color: inherit;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&amp;nbsp; &lt;/SPAN&gt;&lt;/LI&gt;&lt;LI style="border-left-width: 3px; border-style: none none none solid; border-left-color: #6ce26c; font-weight: inherit; font-style: inherit; font-family: inherit; vertical-align: baseline; position: relative; list-style: decimal-leading-zero outside; min-height: 0px; line-height: 12pt; height: auto; word-wrap: break-word; margin-top: 0px !important; margin-bottom: 0px !important; padding-right: 3px !important; padding-left: 10px !important; outline: 0px !important; background-color: #f6f6f6;"&gt;&lt;SPAN style="margin: 0px; padding: 0px; border: 0px; font-weight: inherit; font-style: inherit; vertical-align: baseline; color: black; font-size: 9pt !important; outline: 0px !important; background-color: inherit;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="keyword" style="margin: 0px; padding: 0px; border: 0px; font-weight: inherit; font-style: inherit; vertical-align: baseline; color: #006699; font-size: 9pt !important; outline: 0px !important; background-color: inherit;"&gt;this&lt;/SPAN&gt;&lt;SPAN style="margin: 0px; padding: 0px; border: 0px; font-weight: inherit; font-style: inherit; vertical-align: baseline; font-size: 9pt !important; outline: 0px !important; background-color: inherit;"&gt;.editor.attributeInspector.refresh();&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI class="alt" style="border-left-width: 3px; border-style: none none none solid; border-left-color: #6ce26c; font-weight: inherit; font-style: inherit; font-family: inherit; vertical-align: baseline; position: relative; list-style: decimal-leading-zero outside; min-height: 0px; color: inherit; line-height: 12pt; height: auto; word-wrap: break-word; margin-top: 0px !important; margin-bottom: 0px !important; padding-right: 3px !important; padding-left: 10px !important; outline: 0px !important;"&gt;&lt;SPAN style="margin: 0px; padding: 0px; border: 0px; font-weight: inherit; font-style: inherit; vertical-align: baseline; color: black; font-size: 9pt !important; outline: 0px !important; background-color: inherit;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&amp;nbsp; &lt;/SPAN&gt;&lt;/LI&gt;&lt;LI style="border-left-width: 3px; border-style: none none none solid; border-left-color: #6ce26c; font-weight: inherit; font-style: inherit; font-family: inherit; vertical-align: baseline; position: relative; list-style: decimal-leading-zero outside; min-height: 0px; line-height: 12pt; height: auto; word-wrap: break-word; margin-top: 0px !important; margin-bottom: 0px !important; padding-right: 3px !important; padding-left: 10px !important; outline: 0px !important; background-color: #f6f6f6;"&gt;&lt;SPAN style="margin: 0px; padding: 0px; border: 0px; font-weight: inherit; font-style: inherit; vertical-align: baseline; color: black; font-size: 9pt !important; outline: 0px !important; background-color: inherit;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }));&amp;nbsp; &lt;/SPAN&gt;&lt;/LI&gt;&lt;LI class="alt" style="border-left-width: 3px; border-style: none none none solid; border-left-color: #6ce26c; font-weight: inherit; font-style: inherit; font-family: inherit; vertical-align: baseline; position: relative; list-style: decimal-leading-zero outside; min-height: 0px; color: inherit; line-height: 12pt; height: auto; word-wrap: break-word; margin-top: 0px !important; margin-bottom: 0px !important; padding-right: 3px !important; padding-left: 10px !important; outline: 0px !important;"&gt;&lt;SPAN style="margin: 0px; padding: 0px; border: 0px; font-weight: inherit; font-style: inherit; vertical-align: baseline; color: black; font-size: 9pt !important; outline: 0px !important; background-color: inherit;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&amp;nbsp; &lt;/SPAN&gt;&lt;/LI&gt;&lt;LI style="border-left-width: 3px; border-style: none none none solid; border-left-color: #6ce26c; font-weight: inherit; font-style: inherit; font-family: inherit; vertical-align: baseline; position: relative; list-style: decimal-leading-zero outside; min-height: 0px; line-height: 12pt; height: auto; word-wrap: break-word; margin-top: 0px !important; margin-bottom: 0px !important; padding-right: 3px !important; padding-left: 10px !important; outline: 0px !important; background-color: #f6f6f6;"&gt;&lt;SPAN style="margin: 0px; padding: 0px; border: 0px; font-weight: inherit; font-style: inherit; vertical-align: baseline; color: black; font-size: 9pt !important; outline: 0px !important; background-color: inherit;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }));&lt;/SPAN&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 15:24:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/user-definable-default-values-in-popup-while/m-p/324923#M29937</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2021-12-11T15:24:29Z</dc:date>
    </item>
    <item>
      <title>Re: User-definable default values in popup while editing?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/user-definable-default-values-in-popup-while/m-p/324924#M29938</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Wow, Robert, your help has saved me so much time!&amp;nbsp; I had to tweak the code a bit to get it to work in my WMA, but now it is doing exactly what I wanted!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Users have the option to enter their default information in the text boxes in the left pane, and click OK:&lt;/P&gt;&lt;P&gt;&lt;IMG alt="LeftPaneWithDefaultValues_good.png" class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/196133_LeftPaneWithDefaultValues_good.png" style="width: auto; height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is the code for the function that runs when the OK button is clicked:&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;function clickBtnSetDefaultInfo()&amp;nbsp; {
&amp;nbsp;&amp;nbsp;&amp;nbsp; var inname = txt1.value;
&amp;nbsp;&amp;nbsp;&amp;nbsp; var incomm = txt2.value;
&amp;nbsp;&amp;nbsp;&amp;nbsp; var inemail = txt3.value;
&amp;nbsp;&amp;nbsp;&amp;nbsp; var inphone = txt4.value;
&amp;nbsp;&amp;nbsp;&amp;nbsp; // Set auto population of commenter fields
&amp;nbsp;&amp;nbsp;&amp;nbsp; theEditor.settings.editor.templatePicker.on("selection-change", lng.hitch(this, function() {&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var selected = theEditor.settings.editor.templatePicker.getSelected();&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (selected) {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; fLayerPt.on("before-apply-edits", lng.hitch(this, function(evt){&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(evt.adds &amp;amp;&amp;amp; evt.adds.length &amp;gt; 0){&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(evt.adds[0].attributes.hasOwnProperty('CommenterName')){ evt.adds[0].attributes.CommenterName = inname;&amp;nbsp; }
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(evt.adds[0].attributes.hasOwnProperty('CommenterComm')){ evt.adds[0].attributes.CommenterComm = incomm;&amp;nbsp; }
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(evt.adds[0].attributes.hasOwnProperty('CommenterEmail')){ evt.adds[0].attributes.CommenterEmail = inemail;&amp;nbsp; }
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(evt.adds[0].attributes.hasOwnProperty('CommenterPhone')){ evt.adds[0].attributes.CommenterPhone = inphone;&amp;nbsp; }
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; theEditor.settings.editor.attributeInspector.refresh(); 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }));&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; }));
}&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And then here is the popup when the user adds a new point:&lt;/P&gt;&lt;P&gt;&lt;IMG alt="PopupEditing_good.png" class="image-2 jive-image" src="https://community.esri.com/legacyfs/online/196135_PopupEditing_good.png" style="width: auto; height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The Clear button will run a similar function to the OK button, it sets the text box values and the default values to "".&lt;/P&gt;&lt;P&gt;Thanks again!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 15:24:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/user-definable-default-values-in-popup-while/m-p/324924#M29938</guid>
      <dc:creator>ZoeZaloudek</dc:creator>
      <dc:date>2021-12-11T15:24:32Z</dc:date>
    </item>
    <item>
      <title>Re: User-definable default values in popup while editing?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/user-definable-default-values-in-popup-while/m-p/324925#M29939</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I edited my code a bit more, so I figured I'd share.&amp;nbsp; For the 'Clear' button, instead of running code similar to the 'Set' function, now it simply sets the values of the text boxes in the left pane to blank strings, and then runs the 'Set' function.&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;function clickBtnClearDefaultInfo()&amp;nbsp; {
&amp;nbsp;&amp;nbsp;&amp;nbsp; txt1.value = '';
&amp;nbsp;&amp;nbsp;&amp;nbsp; txt2.value = '';
&amp;nbsp;&amp;nbsp;&amp;nbsp; txt3.value = '';
&amp;nbsp;&amp;nbsp;&amp;nbsp; txt4.value = '';
&amp;nbsp;&amp;nbsp;&amp;nbsp; clickBtnSetDefaultInfo();
}&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 15:24:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/user-definable-default-values-in-popup-while/m-p/324925#M29939</guid>
      <dc:creator>ZoeZaloudek</dc:creator>
      <dc:date>2021-12-11T15:24:35Z</dc:date>
    </item>
  </channel>
</rss>

