开发者

Validate a form that contains a Google Maps field

开发者 https://www.devze.com 2023-02-07 07:43 出处:网络
Hi I\'m building a form to register users in a web application (开发者_JAVA技巧php). The form should have a google maps map where user should set his location and address.

Hi

I'm building a form to register users in a web application (开发者_JAVA技巧php).

The form should have a google maps map where user should set his location and address.

Is there any API or code I could take to validate this field with jQuery or common JavaScript? I must be sure that the new user sets any location before submitting the form

I've seen this example, and would need something similar but for jQuery

http://phpformclass.com/phpform/examples/mapmarker

Thanks!


Are you searching for jquery map plugins?If yes try jmapping and gmap.If you want to implement by yourself try to begin reading the google maps api documentation. To validate the point i would use i.e. regex to make sure that the coords are valid Cheers

0

精彩评论

暂无评论...
验证码 换一张
取 消