Hello,
I want to use a geopoint type question in a form that I’m building, but want to preload in a default value based on a user’s selection from a previous question.
I have been able to successfully load in a default value to the geopoint question by hardcoding in coordinates in the “default” field in the XLS, but when I try to set the default to a calculated value instead, the question no longer works as expected (it shows a text box instead of a map).
I confirmed that the calculated value is working by displaying it as a note. I just can’t seem to successfully feed it into the geopoint question via the “default” or “calculation” fields in the XLS form.
I’m open to using other question types if needed, or to have a “display-only” map. I just need to be able to filter and then show coordinates on a map-style display for the user.
Welcome to the community, @ewilcox! If I understand your query correctly, it seems you’re trying to design a form where the current geopoint recorded is automatically loaded when filling out the next submission. Please feel free to correct me if I’ve misunderstood your issue.
Hi @Kal_Lam - that is an accurate description of my issue! More specifically, I will probably have a list of projects and associated coordinates in a csv/list, and when a user selects a project, I would like to have the associated coordinate be displayed in a geopoint-style question (or any other question type that can display this info in a map).
You can accomplish this, but not with the regular defaults. Instead, you basically need to use triggers; there’s a short how-to accomplish this here.
Your case is a little trickier because you have to generate a correctly formatted geopoint value as the trigger, and then use this to change the current value of the following geopoint (ie map) question. Take a look at this form:
DynamicGeoDefault.xlsx (18.5 KB)
In this form I’m using a select_one question to pick between different locations (famous capitals of the world). Whenever this select question changes, it results in a ‘trigger’ on the following geopoint question to change the value to the new calculated value; in this case copying the new location value to recenter the map.
Have a play and let me know if it does the trick for you.
Thank you, @Xiphware! I was able to get this working on my end, and it seems to have accomplished exactly what I was hoping for.