Change "Report it" Button Text of Citizen Problem Reporter App

437
7
Jump to solution
12-24-2019 08:14 AM
JaredPilbeam2
MVP Regular Contributor

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...

0 Kudos
1 Solution

Accepted Solutions
Noah-Sager
Esri Regular Contributor

How about line 93 of the resources.js file?

crowdsource-reporter-master\js\nls\resources.js

View solution in original post

7 Replies
RobertScheitlin__GISP
MVP Esteemed Contributor

Jared,

   Have you searched the js files for "submitButton"?

JaredPilbeam2
MVP Regular Contributor

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.

0 Kudos
RobertScheitlin__GISP
MVP Esteemed Contributor

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

JaredPilbeam2
MVP Regular Contributor

The "submitReportButtonText" is for the other "submit" button. I already had that changed to "Fill Out Questionnaire" in config/defaults.js.

0 Kudos
Noah-Sager
Esri Regular Contributor

How about line 93 of the resources.js file?

crowdsource-reporter-master\js\nls\resources.js

JaredPilbeam2
MVP Regular Contributor

Thanks Noah,

That js file somehow escaped me. That was the right one.

Noah-Sager
Esri Regular Contributor

Cool, glad that helped. Sometimes the "Find in Files..." search, and starting from the root folder, really helps for these kinds of cases.