MapBox get City/location name from long and latit

I know this post is old but I've managed to store the co-ordinates using

return utils.getCurrentPosition()

  1. Add as a new JS Code script
  2. Call script on Load
  3. Store data in number fields e.g. {{getCurLocation.data.coords.longitude}} where getCurLocation is the name of your JS Code script
  4. 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}}
)