How to modify Coordinate Conversion "placeholder" text?

656
3
11-10-2022 08:01 AM
Labels (2)
JenaF
by
New Contributor II

Hey all - 

I thought this would be a simple modification, but I find myself stumped.

In the OOB Web AppBuilder "Coordinate Conversion" widget, I would like to change the default prompt text to something other than "Enter coordinates or click on map". Ideally, I'd like different text in the input and output text areas, but the input is most important.

JenaF_0-1668094798345.png

 

Things I've tried so far:

1. Changing the nls/strings.js entry that matches the current text. This has no effect. The key name for the text string ("coordinateInputLabel") isn't called anywhere.

2. Investigating setting a label/name/placeholder value in the Widget.js CoordinateControl class instantiation. Reading the class documentation (https://developers.arcgis.com/web-appbuilder/api-reference/coordinatecontrol.htm), the label applies to a different component (which I can change through the nls string) and there is no placeholder or name parameter.

On a potentially related note, when I explicitly set the Widget.js CoordinateControl class "drawToolTip" parameter, I can overwrite the default text. However, I can't find where the default text for that is coming from. I suspect it's the same place as the default text for the coordinate boxes. I don't need to change that text, it's just relevant in that it lends support to the idea that there is something unknown to me (possibly outside the specific widget folder?) providing default values.

 

Ideas about where to find the "Enter coordinates or click on map" text to edit it? And what property/parameter is referencing it?

 

Thanks,

Jena 

0 Kudos
3 Replies
KevinGonzago
Esri Contributor

Hi @JenaF, thank you for bringing this to our attention. And you're right, there isn't an OOTB way to change the placeholder text when the "input" parameter for the CoordinateControl class is set to false. The placeholder text makes sense when that class is implemented for the "Input" section of the widget and not the "Output" section. In your opinion, should a user be allowed to change the "Enter coordinates or click on map" text through the widget configuration page or through an exposed parameter in the CoordinateControl class? Any input you can provide is much appreciated.

0 Kudos
JenaF
by
New Contributor II

@KevinGonzago Re: where a user should be able to change the text
Well, it depends on which user group/s you want to target. Making that text editable in the widget config page would reach everyone; making it a parameter in the CoordinateControl class would reach those folks willing to use WABDE. Personally, it makes no difference to me, so I would recommend whichever would get implemented faster. Editing text strings is an easy change and a "soft intro" to WABDE, so maybe it would encourage more people to become comfortable working in that???
Thanks for considering the idea!

SubaKrishnan
Esri Contributor

Hi, @JenaFI noticed the placeholder is only available in the input and not the output text area. Could you verify if it still appears in both the input and output text areas? The current placeholder seems appropriate, and I'd like to know the use case or requirement to change it along with the desired text. Please explain. Thank you!

SubaKrishnan_0-1670350111527.png

 

0 Kudos