I know this post is old but I've managed to store the co-ordinates using
return utils.getCurrentPosition()
- Add as a new JS Code script
- Call script on Load
- Store data in number fields e.g. {{getCurLocation.data.coords.longitude}} where getCurLocation is the name of your JS Code script
- On submit, store number field values in DB:
Eg:
Insert INTO
gg_Sightings (id, "Date", "Long", "Lat", "Markings", "Color")
VALUES
(
(
SELECT
MAX(ID) + 1
FROM
gg_Sightings
),
NOW (),
{{long.value}},
{{lat.value}},
{{txtMarkings.value}},
{{txtColor.value}}
)