<?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: Change Search Widget Multi Source Placeholder Text in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/change-search-widget-multi-source-placeholder-text/m-p/562538#M52527</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;All the default api strings are contained in an object that is translated into all the languages the API supports. More info about this can be found here: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://developers.arcgis.com/javascript/jshelp/inside_bundle.html" style="line-height: 1.5;" title="https://developers.arcgis.com/javascript/jshelp/inside_bundle.html"&gt;Default API Strings | Guide | ArcGIS API for JavaScript&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So to modify the default strings you'll load the strings object and make the necessary modifications.&amp;nbsp; Here's an example showing how I'd update the placeholder text for the search widget assuming I've loaded esriBundle using the steps outlined in the help topic I liked above. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; esriBundle.widgets.Search.main.placeholder = "My Placeholder"&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 14 Apr 2015 17:55:40 GMT</pubDate>
    <dc:creator>KellyHutchins</dc:creator>
    <dc:date>2015-04-14T17:55:40Z</dc:date>
    <item>
      <title>Change Search Widget Multi Source Placeholder Text</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/change-search-widget-multi-source-placeholder-text/m-p/562535#M52524</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;How do you change the placeholder text for the new Search Widget.&amp;nbsp; I understand how to do it per source but when searching multiple sources at once I can't seem to find a property to set the placeholder text that would replace the "Search address or place" text. Any help would be appreciated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is the search widget I am referring to.&lt;/P&gt;&lt;P&gt;&lt;A href="https://developers.arcgis.com/javascript/jsapi/search-amd.html"&gt;https://developers.arcgis.com/javascript/jsapi/search-amd.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edit: In the meantime I can use this to set it but I think there should be a property for this somewhere.&lt;/P&gt;&lt;PRE __default_attr="javascript" __jive_macro_name="code" class="jive_macro_code _jivemacro_uid_14289680162676938 jive_text_macro" data-renderedposition="176_8_912_16" jivemacro_uid="_14289680162676938"&gt;&lt;P&gt;document.getElementById('search_input').placeholder&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Isaiah&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Apr 2015 23:29:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/change-search-widget-multi-source-placeholder-text/m-p/562535#M52524</guid>
      <dc:creator>IsaiahAguilera</dc:creator>
      <dc:date>2015-04-13T23:29:28Z</dc:date>
    </item>
    <item>
      <title>Re: Change Search Widget Multi Source Placeholder Text</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/change-search-widget-multi-source-placeholder-text/m-p/562536#M52525</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You'll want to set the placeholder on the source instead of the search widget itself.&amp;nbsp; Check out the example on the sources object in the help. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://developers.arcgis.com/javascript/jsapi/search-amd.html#sources" title="https://developers.arcgis.com/javascript/jsapi/search-amd.html#sources"&gt;Search | API Reference | ArcGIS API for JavaScript&lt;/A&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This sample also shows how to set placeholders for each source: &lt;/P&gt;&lt;P&gt;&lt;A href="https://developers.arcgis.com/javascript/jssamples/search_multiplesources.html" title="https://developers.arcgis.com/javascript/jssamples/search_multiplesources.html"&gt;Search multiple sources | ArcGIS API for JavaScript&lt;/A&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Apr 2015 16:50:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/change-search-widget-multi-source-placeholder-text/m-p/562536#M52525</guid>
      <dc:creator>KellyHutchins</dc:creator>
      <dc:date>2015-04-14T16:50:30Z</dc:date>
    </item>
    <item>
      <title>Re: Change Search Widget Multi Source Placeholder Text</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/change-search-widget-multi-source-placeholder-text/m-p/562537#M52526</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Okay I understand that part but when I switch the search widget to search all sources at once the placeholder switches to "Search address or place". That is what I wanted to change.&amp;nbsp; I did it easy enough by selecting the dom element by id but I just wanted to see if there was an out of the box way to change the placeholder when the widget is searching all sources at once.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Apr 2015 17:38:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/change-search-widget-multi-source-placeholder-text/m-p/562537#M52526</guid>
      <dc:creator>IsaiahAguilera</dc:creator>
      <dc:date>2015-04-14T17:38:58Z</dc:date>
    </item>
    <item>
      <title>Re: Change Search Widget Multi Source Placeholder Text</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/change-search-widget-multi-source-placeholder-text/m-p/562538#M52527</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;All the default api strings are contained in an object that is translated into all the languages the API supports. More info about this can be found here: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://developers.arcgis.com/javascript/jshelp/inside_bundle.html" style="line-height: 1.5;" title="https://developers.arcgis.com/javascript/jshelp/inside_bundle.html"&gt;Default API Strings | Guide | ArcGIS API for JavaScript&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So to modify the default strings you'll load the strings object and make the necessary modifications.&amp;nbsp; Here's an example showing how I'd update the placeholder text for the search widget assuming I've loaded esriBundle using the steps outlined in the help topic I liked above. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; esriBundle.widgets.Search.main.placeholder = "My Placeholder"&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Apr 2015 17:55:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/change-search-widget-multi-source-placeholder-text/m-p/562538#M52527</guid>
      <dc:creator>KellyHutchins</dc:creator>
      <dc:date>2015-04-14T17:55:40Z</dc:date>
    </item>
    <item>
      <title>Re: Change Search Widget Multi Source Placeholder Text</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/change-search-widget-multi-source-placeholder-text/m-p/562539#M52528</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Got it! Thank you! That makes sense.&amp;nbsp; I appreciate the response!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Apr 2015 20:23:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/change-search-widget-multi-source-placeholder-text/m-p/562539#M52528</guid>
      <dc:creator>IsaiahAguilera</dc:creator>
      <dc:date>2015-04-14T20:23:04Z</dc:date>
    </item>
    <item>
      <title>Re: Change Search Widget Multi Source Placeholder Text</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/change-search-widget-multi-source-placeholder-text/m-p/562540#M52529</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I tried &lt;SPAN style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;esriBundle.widgets.Search.main.placeholder = "My Placeholder" but somehow it did not do the trick.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;I looked into the widget and found another property for main placeholder which is called "allPlaceholder" so &lt;SPAN style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;esriBundle.widgets.Search.main.allPlaceholder = "My Placeholder"&amp;nbsp; did the work. I also tried updating "allPlaceholder" in the search class properties and it worked as well. &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="line-height: 1.5;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var mySearch = new Search({&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; allPlaceholder: "My Placeholder"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }, "search");&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; sources.push({&lt;/P&gt;&lt;P&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; placeholder: "Sub-Placeholder 1"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; });&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; sources.push({&lt;/P&gt;&lt;P&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; placeholder: "Sub-Placeholder 2"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; });&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; mySearch("sources", sources);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; mySeacrh.startup();&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 Oct 2015 04:00:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/change-search-widget-multi-source-placeholder-text/m-p/562540#M52529</guid>
      <dc:creator>CemAkkus2</dc:creator>
      <dc:date>2015-10-30T04:00:27Z</dc:date>
    </item>
    <item>
      <title>Re: Change Search Widget Multi Source Placeholder Text</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/change-search-widget-multi-source-placeholder-text/m-p/562541#M52530</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey Isaiah, Not sure if you already found the solution, but I fixed this in my code using this,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;search.on("load", function () {&lt;/P&gt;&lt;P&gt; //push all the sources&lt;/P&gt;&lt;P&gt;&amp;nbsp; var sources = search.sources;&lt;/P&gt;&lt;P&gt;&amp;nbsp; sources.push(addSources("ABC","ABC","eg : ABC",1));&lt;/P&gt;&lt;P&gt;&amp;nbsp; sources.push(addSources("XYZ","XYZ","eg: XYZ",1));&lt;/P&gt;&lt;P&gt;&amp;nbsp; search.set("sources", sources);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; //Adding the placeholder here, as the search bar is loaded with sources only at this point of the execution&lt;/P&gt;&lt;P&gt;&amp;nbsp; //Hence, we can modify the CSS only after this point.&lt;/P&gt;&lt;P&gt;&amp;nbsp; $("#search_input").attr('placeholder','Search Tree Data');&lt;/P&gt;&lt;P&gt;&amp;nbsp; });&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You cannot modify the CSS anywhere in the code. It has to be modified only when the search bar has been loaded with all its sources. I tried adding a $document.ready(function(){}); or adding the css at the end of the body. Nothing worked because we are using a different javascript library/toolkit here - Dojo. Hence, we can only performs operations based on how the data is loaded or when call backs are called in Dojo. and not in normal HTML javascript to jQuery.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Nov 2015 22:20:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/change-search-widget-multi-source-placeholder-text/m-p/562541#M52530</guid>
      <dc:creator>MeghnaNatraj</dc:creator>
      <dc:date>2015-11-30T22:20:42Z</dc:date>
    </item>
  </channel>
</rss>

