Geolocation widget: Showing or Hiding Fields Conditions

  • Aaardvaark
    Asked on January 30, 2015 at 1: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 geo stamp, 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".

  • Jan
    Replied on January 30, 2015 at 9:53 AM

    Hello there,

    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.

    Thank you!

  • Aaardvaark
    Replied on January 31, 2015 at 6:33 AM

    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.

     

  • Ashwin JotForm Support
    Replied on January 31, 2015 at 2:11 PM

    Hello Aaardvaark,

    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 form GPS location, it is not possible to reset the captured location unless the form is reloaded again. 

    Thank you!

  • Aaardvaark
    Replied on January 31, 2015 at 7:09 PM

    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.

  • widgets Jotform Support
    Replied on February 5, 2015 at 12:45 AM

    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.

    Regards,
    Widget Team

  • Aaardvaark
    Replied on February 5, 2015 at 6:22 AM

    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!

    Cheers

     

  • Ashwin JotForm Support
    Replied on February 5, 2015 at 7:50 AM

    Hello Aaardvaark,

    Your message has reached my colleague. He will get back to you one he is available online.

    Thank you!

  • TitusN
    Replied on June 23, 2015 at 4:54 AM

    Hello, 

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

  • Julian
    Replied on June 24, 2015 at 4:43 AM

    Hi

     

    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.Geolocation widget: Showing or Hiding Fields Conditions Image 1 Screenshot 30

    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:

    Geolocation widget: Showing or Hiding Fields Conditions Image 2 Screenshot 41

     

    Cheers

    Julian

  • jonathan
    Replied on June 24, 2015 at 5:08 AM

    @Julian

    I created a separate thread to your new question here http://www.jotform.com/answers/595495