Disable Predictive Text on Geocode Question -- XLSForm -- Survey123 Connect

1369
10
Jump to solution
07-31-2023 09:11 PM
UH12
by
Occasional Contributor

Hi all,

Very novice ArcGIS/Survey123 Connect learner here.

I would greatly appreciate if someone could help me disable predictive text/suggestions when a user is taking answering a geocode question on my XLSForm survey. The data in the geocode field is being fed on to a tooltip on a web map, and I think it's a bit odd that some fields have addresses (the user clicked on a predictive text result) and some don't (the user did not click on a predictive text result).

The closest I've come to a solution is via this support article under "suggestions."

To turn the predictive text feature off from its default setting (on), I've been going into the XLSForm spreadsheet under the body::esri:style column as directed and typing in "suggestions=no" and "suggest=no" and various other permutations but nothing seems to work.

I've linked my XLSForm spreadsheet HERE for review. 

Appreciative of any help...thank you!

 

0 Kudos
1 Solution

Accepted Solutions
UH12
by
Occasional Contributor

Problem solved!

After downloading ArcGIS Survey123 (what I assume is the "field app") and attempting to take the survey through there, "suggestions=no" in the "body::esri:style" column did not disable predictive text.

So @abureaux is right -- the geocode field doesn't not want to make suggestions.

My workaround: add a hidden text field in the XLSForm and using a JSON function to calculate what I wanted: not the whole address of what was inputted but a shorter version -- "attributes.ShortLabel" seems to have done the trick. After republishing the survey via Survey123 Connect and making it add the field to my feature service, I was able to add that field to my map's tooltip, displaying the "ShortLabel" of whatever was inputted -- whether the user clicked on a search result or not.

Thanks for the help @abureaux!

 

View solution in original post

0 Kudos
10 Replies
UH12
by
Occasional Contributor

Forgot to add the link to the survey itself: https://survey123.arcgis.com/share/01770d09e5744a288837ed3efae5866d

 

0 Kudos
abureaux
MVP Frequent Contributor

I don't have many forms with this field, so haven't tried this myself. But the first thing my mind jumps to is the appearance.

Have you tried setting that?

abureaux_0-1690922403138.png

 

0 Kudos
UH12
by
Occasional Contributor

@abureaux 

Yes, I believe I have tried that. While the predictive text does go away, so does the question's ability to geocode since its appearance is changed. When data comes through, it is not geocoded and doesn't plot anything on my map.  I would like my form to be able to geocode without predictive text so that the results can be plotted on a web map.

 

Thank you for the help!

 

0 Kudos
abureaux
MVP Frequent Contributor

You should be able to combine appearances. So you could do nonpredictivetext geocode

0 Kudos
UH12
by
Occasional Contributor

@abureaux 

 

That doesn't seem to work. I still get the predictive text and Excel returns a data validation error since the text "nopredictivetext geocode" is not in the dropdown of appearance options for a text question.

0 Kudos
abureaux
MVP Frequent Contributor

You can actually ignore those Data Validation errors in the appearance column a lot of the time. For example, if we were using a grid and added a width:

abureaux_0-1690925433888.png

As for the geocode appearance, it doesn't seem to not want to make suggestions. Perhaps someone else knows something I don't.

 

Perhaps a different approach is in order? Not sure if you've tried something like this yet.

For example, you could make a calculate called address. This address field could have two states:

  1. If the user clicks on a suggestion, make it be that suggestion. You can use calculates to extract information from the geocode and achieve this result. See below for a couple examples of extracting data from the geocode question. "Score" is the only special one I know of for geocode, where the higher the value, the more likely someone clicked on a geocode result/the result is correct
    abureaux_2-1690926152330.png
  2. If the user doesn't select an address from the geocode, make the address calculate equal the text entered into your geocode field

 

0 Kudos
UH12
by
Occasional Contributor

@abureaux 

Thanks for the explanation -- do you think there is a way to geocode anything entered in a "user input text" field? I'm looking into that as a possible alternative method as well as going to try your proposed solution in the near future.

What I've figured out is that "suggestions=no" is the correct way to stop predictive text but does not work even on Esri's own examples. They say "suggestions=no" only works on the "field app," which I presume in ArcGIS Survey123 (NOT Survey123 Connect). But the field app seems only like a proxy for completing already generated surveys. 

 

0 Kudos
abureaux
MVP Frequent Contributor

The short answer is "yes", but I am not familiar with the method. It would involve additional software (e.g., ArcPro, FME, etc.), and is not something I've needed to try. The easiest way, of course, would be the geocode question type.

Good to know "suggestions=no" should work in the Field App though.

0 Kudos
UH12
by
Occasional Contributor

Problem solved!

After downloading ArcGIS Survey123 (what I assume is the "field app") and attempting to take the survey through there, "suggestions=no" in the "body::esri:style" column did not disable predictive text.

So @abureaux is right -- the geocode field doesn't not want to make suggestions.

My workaround: add a hidden text field in the XLSForm and using a JSON function to calculate what I wanted: not the whole address of what was inputted but a shorter version -- "attributes.ShortLabel" seems to have done the trick. After republishing the survey via Survey123 Connect and making it add the field to my feature service, I was able to add that field to my map's tooltip, displaying the "ShortLabel" of whatever was inputted -- whether the user clicked on a search result or not.

Thanks for the help @abureaux!

 

0 Kudos