<?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: [4.3]-How to modify the placeholder for Search widget? in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/4-3-how-to-modify-the-placeholder-for-search/m-p/703773#M65542</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;since your search widget id is "searchWidget", your search input box id should be&amp;nbsp;searchWidget_input. you could set this input box's placeholder property after the view is load like the following:&lt;/P&gt;&lt;P&gt;view.then(function () {&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;document.getElementById("searchWidget_input").placeholder = "Search Location";&lt;BR /&gt;});&lt;/P&gt;&lt;P&gt;btw, allPlaceholder is used when you have mulitple address locator.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 02 Jun 2017 14:37:59 GMT</pubDate>
    <dc:creator>HemingZhu</dc:creator>
    <dc:date>2017-06-02T14:37:59Z</dc:date>
    <item>
      <title>[4.3]-How to modify the placeholder for Search widget?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/4-3-how-to-modify-the-placeholder-for-search/m-p/703772#M65541</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm trying to modify the placeholder for search widget. But the attribute &lt;STRONG&gt;allPlaceholder&lt;/STRONG&gt;&amp;nbsp;seems invalid.&lt;IMG src="https://community.esri.com/legacyfs/online/emoticons/sad.png" /&gt;&lt;/P&gt;&lt;P&gt;What's wrong with my scripts?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Version of ArcGIS API for JavaScript : 4.3&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;&amp;lt;!DOCTYPE html&amp;gt;&lt;BR /&gt;&amp;lt;html&amp;gt;&lt;BR /&gt; &amp;lt;head&amp;gt;&lt;BR /&gt; &amp;lt;meta charset='utf-8'&amp;gt;&lt;BR /&gt; &amp;lt;meta name='viewport' content='initial-scale=1, maximum-scale=1, user-scalable=no'&amp;gt;&lt;BR /&gt; &amp;lt;title&amp;gt;Create a map&amp;lt;/title&amp;gt;&lt;BR /&gt; &amp;lt;style&amp;gt;&lt;BR /&gt; html, body, #viewDiv{&lt;BR /&gt; padding: 0;&lt;BR /&gt; margin: 0;&lt;BR /&gt; height: 100%;&lt;BR /&gt; width: 100%;&lt;BR /&gt; }&lt;BR /&gt; &amp;lt;/style&amp;gt;&lt;BR /&gt;&lt;SPAN&gt; &amp;lt;link rel="stylesheet" href="&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=https%3A%2F%2Fjs.arcgis.com%2F4.3%2Fesri%2Fcss%2Fmain.css" rel="nofollow" target="_blank"&gt;https://js.arcgis.com/4.3/esri/css/main.css&lt;/A&gt;&lt;SPAN&gt;"&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &amp;lt;script src="&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=https%3A%2F%2Fjs.arcgis.com%2F4.3%2F" rel="nofollow" target="_blank"&gt;https://js.arcgis.com/4.3/&lt;/A&gt;&lt;SPAN&gt;"&amp;gt;&amp;lt;/script&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt; &amp;lt;script&amp;gt;&lt;BR /&gt; require([&lt;BR /&gt; 'esri/Map',&lt;BR /&gt; 'esri/views/MapView',&lt;BR /&gt; 'esri/widgets/Search',&lt;BR /&gt; 'dojo/domReady!'], function(Map, MapView, Search){&lt;BR /&gt; var map = new Map({&lt;BR /&gt; basemap: 'streets'&lt;BR /&gt; });&lt;BR /&gt; &lt;BR /&gt; var view = new MapView({&lt;BR /&gt; container: 'viewDiv',&lt;BR /&gt; map: map,&lt;BR /&gt; zoom: 10,&lt;BR /&gt; center: [-73.939501, 42.818609]&lt;BR /&gt; });&lt;BR /&gt; &lt;BR /&gt; var searchWidget = new Search({&lt;BR /&gt; id: 'searchWidget',&lt;BR /&gt; view: view,&lt;BR /&gt; &lt;STRONG&gt;allPlaceholder: 'Search Location',&lt;/STRONG&gt; // invalid&lt;BR /&gt; popupEnabled: false&lt;BR /&gt; });&lt;BR /&gt; &lt;BR /&gt; view.ui.add(searchWidget, {&lt;BR /&gt; position: 'top-right', // top-left | top-right | bottom-left | bottom-right | manual (default)&lt;BR /&gt; index: 2&lt;BR /&gt; }); &lt;BR /&gt;});&lt;BR /&gt; &amp;lt;/script&amp;gt;&lt;BR /&gt; &amp;lt;/head&amp;gt;&lt;BR /&gt; &amp;lt;body&amp;gt;&lt;BR /&gt; &amp;lt;div id='viewDiv'&amp;gt;&amp;lt;/div&amp;gt;&lt;BR /&gt; &amp;lt;/body&amp;gt;&lt;BR /&gt;&amp;lt;/html&amp;gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Jun 2017 13:50:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/4-3-how-to-modify-the-placeholder-for-search/m-p/703772#M65541</guid>
      <dc:creator>LeoDeng</dc:creator>
      <dc:date>2017-06-02T13:50:40Z</dc:date>
    </item>
    <item>
      <title>Re: [4.3]-How to modify the placeholder for Search widget?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/4-3-how-to-modify-the-placeholder-for-search/m-p/703773#M65542</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;since your search widget id is "searchWidget", your search input box id should be&amp;nbsp;searchWidget_input. you could set this input box's placeholder property after the view is load like the following:&lt;/P&gt;&lt;P&gt;view.then(function () {&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;document.getElementById("searchWidget_input").placeholder = "Search Location";&lt;BR /&gt;});&lt;/P&gt;&lt;P&gt;btw, allPlaceholder is used when you have mulitple address locator.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Jun 2017 14:37:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/4-3-how-to-modify-the-placeholder-for-search/m-p/703773#M65542</guid>
      <dc:creator>HemingZhu</dc:creator>
      <dc:date>2017-06-02T14:37:59Z</dc:date>
    </item>
    <item>
      <title>Re: [4.3]-How to modify the placeholder for Search widget?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/4-3-how-to-modify-the-placeholder-for-search/m-p/1578466#M86427</link>
      <description>&lt;P&gt;2025, v4.31.&amp;nbsp; this solution no longer works. &lt;/P&gt;&lt;P&gt;The error I had is can't find this element.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="hp_134.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/123928iBB2553FBDB9671FF/image-size/medium?v=v2&amp;amp;px=400" role="button" title="hp_134.png" alt="hp_134.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 23 Jan 2025 22:06:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/4-3-how-to-modify-the-placeholder-for-search/m-p/1578466#M86427</guid>
      <dc:creator>hoogw</dc:creator>
      <dc:date>2025-01-23T22:06:51Z</dc:date>
    </item>
  </channel>
</rss>

