Code to Require Location Before Search

Link: https://support.brilliantdirectories.com/support/solutions/articles/12000102910

The code below will make the location field in search modules required when doing a search


<script>
// This script adds the 'required' attribute to all input fields with both classes 'googleSuggest' and 'googleLocation'
$(document).ready(function() {
   // Select all inputs with both classes 'googleSuggest' and 'googleLocation'
   $('input.googleSuggest.googleLocation').attr('required', true);
});
</script>


This code needs to be added to the Additional Footer Code in Design Settings: