What is JotForm?
JotForm is a free online form builder which helps you create online forms without writing a single line of code. No sign-up required.
At JotForm, we want to make sure that you’re getting the online form builder help that you need. Our friendly customer support team is available 24/7.
We believe that if one user has a question, there could be more users who may have the same question. This is why many of our support forum threads are public and available to be searched and viewed. If you’d like help immediately, feel free to search for a similar question, or submit your question or concern.
Geolocation widget: Showing or Hiding Fields ConditionsAsked by Aaardvaark on January 30, 2015 at 01:46 AM
The one change that would be very useful is to give form designers access to the geolocation box, so we can clear it programmatically if the map is not being used. My users have a choice of how to enter their location, but if they choose another method, the map still returns a location that is wrong. I want to be able to say "if user does not choose to use map, clear the widget fields".
As I understand, you want to hide the Geolocation widget depending on the customer's response right?
I created a sample form. Please check it.
It is using the show or hide fields conditions. If the user selected 'yes' the widget will appear, if 'no' the widget will not appear.
Is this what you need? If not, let us know so we can further assist you.
Thanks for that but I probably didn't explain well. At the moment, I give my users a choice of entering location using the widget or, if they have a gps with them (which our surveyors often do), they can enter their own coordinates directly. I give them a radio button selection to say which method they choose.
But when they enter their coordinates directly, there is no way of clearing the coordinates from the widget, so that two sets of coordinates are sent back in the form response. One set that the user entered, and another set that the widget provided that are not correct. This is confusing and I am looking for a way to empty the widget coordinates if the widget is not used.
Other times their might be situations where using the widget is optional, you would not want to send false coordinates back.
So what I would like is acess to the field that the widget fills out, so I can clear it conditionally. I can conditionally clear other fields, but can't find a way to reference or access the widget fields. THen I would insert condition like "If radio button selected for "I will provide my own coordinates" THEN clear widget coordinates"
You ccan see my radio button choices on my form: http://canberrabirds.org.au/observing-birds/incidental-record-form/
Let me know if this doesn't make sense.
If I understand your question correctly, you reset/clear the data captured by GeoLocation widget. Is that correct?
Unfortunately once the GeoLocation widget captures the GPS location, it is not possible to reset the captured location unless the form is reloaded again.
THanks for responding but that is very disappointing. Can't the widget's data be made visible to the form? Then you could clear it. As it stands any form with this widget will always come back with coordinates and an address even if the location is completely wrong, and even if the user did not touch the widget or set/correct their location.
We do apologize that this feature is not currently available.
I have passed on the request to our developers, any update on the request will be posted on this thread.
Hi, here is a better approach as a feature of the widget. Instead of interacting between a field and a widget. How about an option on the widget that you can enable say for example "Allow Manual Coordinates".
Thus a minibox or a fields will appear beneath the map. On load, since the map automatically detect your location it will show those location on the fields and then you can manually edit the coordinates and the map also updates depends on the location coordinates entered. That's the best way to interact with the widget.
Hi - this sounds like a good way of working except that it makes the widget a little bit more complicated for the user, and also I'm concerned that it might introduce new issues.
If you choose the option to allow manual coordinates, what happens if you then drag the marker? If the coordinates in the box change/follow the new dragged position, then you don't really need the option do you? In this case just add a coordinate box which follows the marker, or if you put in your own coordinates, will move the marker. Is this better, easier becasue there is no option to select, and also people can see the coordinates changing when they move marker, gives them more confidence that something is happening.
Anyway this seems a good idea, if it does not cause any new issues!
Your message has reached my colleague. He will get back to you one he is available online.
We've implemented the following features:
1. The ability to enter co-ordinates manually - this will update the map marker automatically
2. When the widget is hidden, its values are cleared when the form is submitted
You can test this out with this sample form - http://form.jotformpro.com/form/50561548497970?
Check out the features, share your experience.
Thanks for this, I've been using the manual coordinates on my form for some time, and it works. I've redesigned my form so I don't need the field clearing which I haven't therefore checked, but this should be very useful.
One thing still remains, the completely inappropriate and meaningless number of decimal places in the displayed coords. Not just unnecessary, but misleads people who might want to enter their own coords, and reduces user faith in our forms. My users know that more than 5 decimal places is totally pointless and send me rude emails about the Jotform presentation. Obviously it's not needed and is an artifact of the programming, and it should be fixed.
Note that 5 decimal places lets you specify which part of a tree you are looking at (about 1m resolution, and more than GPS accuracy).
It should look like this:
I created a separate thread to your new question here http://www.jotform.com/answers/595495