Title: Require Location
Last modified: November 10, 2019

---

# Require Location

 *  Resolved [kpmediadesigner](https://wordpress.org/support/users/kpmediadesigner/)
 * (@kpmediadesigner)
 * [6 years, 6 months ago](https://wordpress.org/support/topic/require-location-2/)
 * I am trying to make a little plugin (or edit existing) that will require Google
   to validate the users location. Basically I just need to get longitude and latitude
   when they ender an address, and if google can’t find one reject the address. 
   That’s really all I need but adding:
    “is_required ” => true, to the defaults.
   php in wpadvers-mal doesn’t seem to change anything like I thought it would based
   on the documentation. I have made the following change after line 92:
 *     ```
               array(
                   "name" => "_adverts_mal_latitude",
                   "type" => "adverts_field_hidden",
                   "class" => "_adverts_mal_latitude",
                   "order" => 55,
                   "is_required " => true,
                   "label" => "",
               ),
               array(
                   "name" => "_adverts_mal_longitude",
                   "type" => "adverts_field_hidden",
                   "class" => "_adverts_mal_longitude",
                   "order" => 60,
                   "is_required " => true,
                   "label" => "",
       ```
   

Viewing 1 replies (of 1 total)

 *  Moderator [Jan Dembowski](https://wordpress.org/support/users/jdembowski/)
 * (@jdembowski)
 * Forum Moderator and Brute Squad
 * [6 years, 5 months ago](https://wordpress.org/support/topic/require-location-2/#post-12116097)
 * For pro or commercial product support please contact the author directly on their
   site. This includes any pre-sales topics as well. This topic was for the MAL 
   add-on and that’s not for these forums.
 * As the author is aware, commercial products are [not supported in these forums](https://wordpress.org/support/guidelines/#do-not-post-about-commercial-products).
   I am sure they will have no problem supporting you there.

Viewing 1 replies (of 1 total)

The topic ‘Require Location’ is closed to new replies.

 * ![](https://ps.w.org/wpadverts/assets/icon-256x256.png?rev=2423472)
 * [WPAdverts - Classifieds Plugin](https://wordpress.org/plugins/wpadverts/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wpadverts/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wpadverts/)
 * [Active Topics](https://wordpress.org/support/plugin/wpadverts/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wpadverts/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wpadverts/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [Jan Dembowski](https://wordpress.org/support/users/jdembowski/)
 * Last activity: [6 years, 5 months ago](https://wordpress.org/support/topic/require-location-2/#post-12116097)
 * Status: resolved