I have a code JS, it returns the exact coordinates of my location,longitude and latitude. I want this information to automatically fall into P1\_GEO when filling out the form. I tried to connect it to dynamic action but nothing worked.
There may be a problem with the code

```
window.onload = function() {

    var startPos;
    var geoSuccess = function(position) {
        startPos = position;
     console.log(startPos.coords.latitude);
     console.log(startPos.coords.longitude); 
     alert(startPos);
    };
    navigator.geolocation.getCurrentPosition(geoSuccess);
};

```