GEOCODE field not available

Hi,
I'm new to plumsail forms.
I've downloaded the trial version yesterday, I'm looking at capturing the GEOlocation on the form. I was reading that the field is available. However, I don't have it available in the form editor. I have the desktop editor installed. Is it something I need to enable or is just not available n the trial vr.?

Hello @omelo,

Welcome to Plumsail Community!

Location is supported in Plumsail Forms for SharePoint.

You can add a location column in the list, click Add Column and add Location.

image

In the designer the field will have this icon: image

And in the form the field displayed like this:
image

Thank you for the prompt response!
Will the GEO code be available on public forms?

Hello @omelo,

Yes, we do have plans to add a location field to Public Forms, but there is no exact release date yet.

Are you considering a paid support? We can switch the priority of tasks and focus on adding the location field. If you are interested, please conduct us via support@plumsail.com for details.

Dear @mnikitina,

I discovered that the "location" field is different from "Geographic" field

Using the location field, you need to enter the name of the country, village or po box number etc., to get a location value.

Using the geographic we have the benefits to see a real map and tag the desired location using Bing Map services or enter the coordinates (longitude and latitude) to get a specific or current location.

In our solution the engineers must enter coordinates (longitude and latitude) for a surveyed location.
using the default Microsoft SP form the features is available. (check the attached pictures)
But using the Plumsail form this type of column isn't compatible

Kindly i need a solution for this.
Thank you

Microsoft form
MS Geolocation 02

MS Geolocation

Plumsail form

Hello @gkhadra,

Geolocation field is not a default SharePoint field and currently, it is not supported in Plumsail Forms.

Are you considering a paid support? We can add the geolocation field to Plumsail Forms. If you are interested, please contact us by email: support@plumsail.com.

Hi @mnikitina! We're using a couple location fields and running into an issue where it will allow the user to save the form, even if a specific location is not selected from the drop-down list. This is resulting in all of the "child" fields of the Location field being blank (Street address, state, country, etc.).

Is there a validator to ensure that the location field has properly resolved? Can we validate on any of those child fields?

thanks!

Hello @Gabegia,

Are these fields required?
image

Make sure that these fields are required and re-save the form. Clear the browser cache and test.

Hi @mnikitina - The problem we're having is not with the fields being blank, but rather they aren't being fully populated with the address/location - see screenshot. Just as an example, in the TravelFrom field I put "asdf" and then tabbed out of the field without selecting a location from the drop-down. In the TravelTo field I again put "asdf" but actually selected one, which populates the full address and all address fields behind the location field.
I'm trying to validate that the drop-down is selected before the user can submit the form (or move to the next wizard step). I'm using an O365 item list, just for reference.

@Gabegia,

Thank you for details!

You can add custom field validator to make sure user select the valid location.

fd.field('Location').validators.push({
    name: 'LocationValidator',
    error: "Select valid location",
    validate: function(value) {
        if (typeof value == 'string')
            return false;

        return true;
    }
});

Hi @mnikitina - This works to validate that there is some form of data in the field, but still isn't verifying that it's populated with geolocation data. I did a little research on what the Location field is and found this (permalink to response): https://techcommunity.microsoft.com/t5/sharepoint/add-location-details-to-sharepoint-data-and-content/m-p/291296/highlight/true#M23884
If this response is correct (and the one above it) the actual data that I'm trying to validate is stored as a json blob file. Can we validate against the blob information?

@Gabegia,

Valid geolocation data is stored as an object. If user just enters custom value and doesn't select the valid gelocaton, the field value is a string.

The custom validator checks if the type of the value, and shows an error if the value is a string.

I figured out what I was doing wrong - I didn't have it inside a "rendered" so the JS wasn't firing.

Thanks again (as always)! This makes our lives MUCH easier!!

Gabe

1 Like

Hi @mnikitina - I'm finding that while the code is working for this, users (crafty little buggers) have figured out a workaround - Bing maps allows them to select an entire city, which registers as an object but does not populate the location object properties such as street address, city, state, zip, etc. (see image below):
Form View:
image
Field View (SharePoint Online):

Do you have any other ideas for validating this to ensure that the address is populated, even if just one of the object properties (like street address or zip code)?

Thanks!

Gabe

@Gabegia,

You can check if selected location address has City and State. Note that not all locations has it.

fd.field('Location').validators.push({
    name: 'LocationValidator',
    error: "Select valid location",
    validate: function(value) {
        if (typeof value == 'string') {
            return false;
        }
        else if(!value.Address.State || !value.Address.City){
            return false;
        }
        return true;
    }
});

Hi @mnikitina - that works for me! I've put it into our prod environment, so now it's time to see how else the users can break it :wink:

Thanks as always!

1 Like