<?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 Auto-populate fields in GeoForm? in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/auto-populate-fields-in-geoform/m-p/415093#M38202</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is it possible to have fields in the GeoForm application automatically populate based upon information from a selection?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have been building an app using ArcGIS API for Javascript 3.20 . In the application, when a user clicks on a feature, the popup appears with some information and a link to the GeoForm. If possible, it would be awesome if some of the fields in&amp;nbsp;the form could be filled with information based on the user's selection.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;geo forms‌ geoform‌ &amp;nbsp;auto complete&amp;nbsp;load data automatically&amp;nbsp;arcgis-javascript-api&amp;nbsp;&lt;A href="https://community.esri.com/t5/tag/arcgis javascript api 3.20/tg-p"&gt;#arcgis javascript api 3.20&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 05 Apr 2017 20:09:54 GMT</pubDate>
    <dc:creator>LeaHarper1</dc:creator>
    <dc:date>2017-04-05T20:09:54Z</dc:date>
    <item>
      <title>Auto-populate fields in GeoForm?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/auto-populate-fields-in-geoform/m-p/415093#M38202</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is it possible to have fields in the GeoForm application automatically populate based upon information from a selection?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have been building an app using ArcGIS API for Javascript 3.20 . In the application, when a user clicks on a feature, the popup appears with some information and a link to the GeoForm. If possible, it would be awesome if some of the fields in&amp;nbsp;the form could be filled with information based on the user's selection.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;geo forms‌ geoform‌ &amp;nbsp;auto complete&amp;nbsp;load data automatically&amp;nbsp;arcgis-javascript-api&amp;nbsp;&lt;A href="https://community.esri.com/t5/tag/arcgis javascript api 3.20/tg-p"&gt;#arcgis javascript api 3.20&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Apr 2017 20:09:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/auto-populate-fields-in-geoform/m-p/415093#M38202</guid>
      <dc:creator>LeaHarper1</dc:creator>
      <dc:date>2017-04-05T20:09:54Z</dc:date>
    </item>
    <item>
      <title>Re: Auto-populate fields in GeoForm?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/auto-populate-fields-in-geoform/m-p/415094#M38203</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;Found a sort of round-about solution with the help of a coworker! Add the fields you want to automatically populate into the url (because I'm switching between two apps):&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;Added this script into the &lt;SPAN style="color: #800080;"&gt;index.html&lt;/SPAN&gt;:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #800080;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;script&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="color: #800080;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;function getParameterByName(name, url) {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="color: #800080;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if (!url) {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="color: #800080;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;url = window.location.href;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="color: #800080;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="color: #800080;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;name = name.replace(/[\[\]]/g, "\\$&amp;amp;");&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="color: #800080;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;var regex = new RegExp("[?&amp;amp;]" + name + "(=([^&amp;amp;#]*)|&amp;amp;|#|$)"),&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="color: #800080;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;results = regex.exec(url);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="color: #800080;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if (!results) return null;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="color: #800080;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if (!results[2]) return '';&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="color: #800080;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;return decodeURIComponent(results[2].replace(/\+/g, " "));&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="color: #800080;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="color: #800080;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;/script&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;Then added the following into the &lt;SPAN style="color: #800080;"&gt;main.js&lt;/SPAN&gt; file:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;SPAN style="color: #800080;"&gt;dom.byId('FORM FIELD&amp;nbsp;HERE').value = getParameterByName('UID');&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Apr 2017 13:38:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/auto-populate-fields-in-geoform/m-p/415094#M38203</guid>
      <dc:creator>LeaHarper1</dc:creator>
      <dc:date>2017-04-11T13:38:08Z</dc:date>
    </item>
  </channel>
</rss>

