Title: Optional field doesn´t work
Last modified: May 7, 2017

---

# Optional field doesn´t work

 *  Resolved [victorrf](https://wordpress.org/support/users/victorrf/)
 * (@victorrf)
 * [9 years, 1 month ago](https://wordpress.org/support/topic/optional-field-doesnt-work/)
 * Hi Nicola,
 * Thanks for your plugin. I have been testing it and it´s working fine, even I 
   can send the data to database from the form and this is very good for the web
   we are preparing. But we are facing an issue; it´s not possible to set the fields
   as not required (optional) fields. In spite of we have set the field as optional
   building the CF7 form, if users keep the field empty the form is not sended and
   appears a message: “No Location set, enter your address then press “SET” to get
   the location.” This is very important for us because not all the users in our
   web are going to send their location. I have tried this in two different ssl 
   sites and occures the same. Please, do you know what can be the problem?
 * A lot of thanks,
 * Victor
 * PD: Finally, I have deactivate the below code in cf7-location-module.php and 
   now it´s possible for me to set the field as optional. Sure it´s possible to 
   do it without deleting code, but it´s a “bit gross” way to get it…
 *  If latitude and longitude are empty
    if ($posted_lat == ”&&$posted_lng==”) {
   $result->invalidate( $tag, __(‘No Location set, enter your address then press“
   SET” to get the location.’,’cf7-location-module’) ); }
 * A lot of thaks.
    -  This topic was modified 9 years, 1 month ago by [victorrf](https://wordpress.org/support/users/victorrf/).
    -  This topic was modified 9 years, 1 month ago by [victorrf](https://wordpress.org/support/users/victorrf/).
    -  This topic was modified 9 years, 1 month ago by [victorrf](https://wordpress.org/support/users/victorrf/).

Viewing 1 replies (of 1 total)

 *  Plugin Author [nicola.bavaro](https://wordpress.org/support/users/nicolabavaro/)
 * (@nicolabavaro)
 * [9 years ago](https://wordpress.org/support/topic/optional-field-doesnt-work/#post-9133116)
 * Dear Victor,
 * this bug will be fixed on next release.
    Thanks for using Location Module for
   CF7.
 * Regards,
    Nicola

Viewing 1 replies (of 1 total)

The topic ‘Optional field doesn´t work’ is closed to new replies.

 * ![](https://ps.w.org/location-module-for-contact-form-7/assets/icon-256x256.jpg?
   rev=1384254)
 * [Location Module (Lite) for Contact Form 7](https://wordpress.org/plugins/location-module-for-contact-form-7/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/location-module-for-contact-form-7/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/location-module-for-contact-form-7/)
 * [Active Topics](https://wordpress.org/support/plugin/location-module-for-contact-form-7/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/location-module-for-contact-form-7/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/location-module-for-contact-form-7/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [nicola.bavaro](https://wordpress.org/support/users/nicolabavaro/)
 * Last activity: [9 years ago](https://wordpress.org/support/topic/optional-field-doesnt-work/#post-9133116)
 * Status: resolved