4

I have a Google Maps component where authors can specify a latitude and a longitude.

I'm using a regular "Input" type control with a regex that validates if they are numbers, but, when trying to approach the problem of specifying a range (have the longitude verify that the value is within [-180, 180] and latitude within [-90, 90] )

However, having this validation through regex seems cumbersome, plus it would be nice to leverage input type="number"

efaj
  • 925
  • 1
  • 12
  • 23

1 Answers1

6

You can make your own Form control following this http://docs.craftercms.org/en/3.0/developers/extending-studio/form-engine-control.html?highlight=control%20form

Cortiz
  • 839
  • 4
  • 7