I can't seem to find a way to change the text of the Report It button. There's no way to do it in the configure menus of the app, and I can't find any reference to it in any JS or HTML file in the app's source code. I'm pretty sure this app is using JS API 3.x.
The image here is of the app I'm working on in the local server, but here's an earlier version of it from AGOL: https://willcountygis.maps.arcgis.com/apps/CrowdsourceReporter/index.html?appid=b3c9cb95a838496ea499...
Solved! Go to Solution.
How about line 93 of the resources.js file?
crowdsource-reporter-master\js\nls\resources.js
Jared,
Have you searched the js files for "submitButton"?
Robert,
No luck. I've searched "SubmitButton", "Report It" and other variations of that but I can't access that button anywhere in the js files. I found reference to it in the CSS, however. That's how I was able to put the chevron in it.
Jared,
You can find the text in the apps main.js in these lines of code:
var submitButtonText, submitButtonColor;
if (this.config && lang.trim(this.config.submitReportButtonText) === "") {
submitButtonText = this.config.i18n.main.submitReportButtonText;
} else {
submitButtonText = this.config.submitReportButtonText;
}
domAttr.set(dom.byId("submitFromMapText"), "innerHTML", submitButtonText);
Line 3 is where the Report It is coming from. So all you need to do is add (or change if it already exists) the submitReportButtonText in the apps config\defaults.js
The "submitReportButtonText" is for the other "submit" button. I already had that changed to "Fill Out Questionnaire" in config/defaults.js.
How about line 93 of the resources.js file?
crowdsource-reporter-master\js\nls\resources.js
Thanks Noah,
That js file somehow escaped me. That was the right one.
Cool, glad that helped. Sometimes the "Find in Files..." search, and starting from the root folder, really helps for these kinds of cases.