Hi,
I want to edit the place holder text and the country code for Search widget. But I am unable to see Search folder(Search/config_Search) in configs folder.
I can set them by opening in WAB, but is there any other way to set both place holder text and country code from source code?
Please help me out here.
Thanks in advance...
Regards,
Ibrahim.
Solved! Go to Solution.
Thanks Robert for the reply...
I have changed in Search/widget.js file
at these two lines:
placeholder: jimuUtils.stripHTML("my text here" || ""),
countryCode: "AUS" || ""
Are these two changes enough or we have to change in any other place also in Search/widget.js???
Regards,
Naveen Kumar.
If you don't find the Search/config_Search then the config for search widget must be in apps config.json. You can find the "config": {} under the widgets configuration in apps config.json file.
Ibrahim,
A configs/Search/config_Search.json will not be added to the apps configs folder until you make a change to the widgets settings. You can make the changes to country code and placeholder in the Widget.js but it would be easier to do this in the widgets settings dialog.
To change the all placeholder text look for "Placeholder text for searching all" in the settings dialog
To change the country code look for the: "Country or Region Code(s)" when selecting a locator source.
Thanks Robert for the reply...
I have changed in Search/widget.js file
at these two lines:
placeholder: jimuUtils.stripHTML("my text here" || ""),
countryCode: "AUS" || ""
Are these two changes enough or we have to change in any other place also in Search/widget.js???
Regards,
Naveen Kumar.
Naveen,
That looks good.
Thanks Robert.