How can I pass a marker latitud and longitud to a form field

Found this and code manually but now I replace with your solution.