Title: Make a field Required
Last modified: August 22, 2016

---

# Make a field Required

 *  Resolved [Zabelator](https://wordpress.org/support/users/zabelator/)
 * (@zabelator)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/make-a-field-required/)
 * Hey,
 * I am hoping this is a simple thing, that I am just missing. But I can’t seem 
   to find a setting or option to make a field required.
 * Basically, I don’t want my users to be able to see the whole site directory, 
   I want them to enter the Username of the person they are looking for, and only
   return the exact matching results.
 * Right now it works fine if the user enters anything to search on, but they can
   search with nothing entered and it lists the entire Member directory.
 * Any help would be great.
 * [https://wordpress.org/plugins/bp-profile-search/](https://wordpress.org/plugins/bp-profile-search/)

Viewing 6 replies - 1 through 6 (of 6 total)

 *  Plugin Author [Andrea Tarantini](https://wordpress.org/support/users/dontdream/)
 * (@dontdream)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/make-a-field-required/#post-5539355)
 * Hi Zabelator,
 * Making a field required would be an interesting new feature, but it’s not available
   in this plugin version.
 * A workaround could be to return no results if all the search fields are left 
   empty. To implement that, open _bps-search.php_ and comment out the line 244:
 * `// $results['validated'] = false;`
 *  Thread Starter [Zabelator](https://wordpress.org/support/users/zabelator/)
 * (@zabelator)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/make-a-field-required/#post-5539373)
 * Thanks for the solution. Works like a charm.
 *  [Steve @ trialsphere](https://wordpress.org/support/users/trialsph/)
 * (@trialsph)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/make-a-field-required/#post-5539461)
 * Does that mean to delete that line?
 *  Plugin Author [Andrea Tarantini](https://wordpress.org/support/users/dontdream/)
 * (@dontdream)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/make-a-field-required/#post-5539462)
 * Yes, that’s the same thing.
 *  [Steve @ trialsphere](https://wordpress.org/support/users/trialsph/)
 * (@trialsph)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/make-a-field-required/#post-5539463)
 * Wow that worked great! My first time editing a file and having it do what I wanted
   it to. Thanks for that!
 *  Plugin Author [Andrea Tarantini](https://wordpress.org/support/users/dontdream/)
 * (@dontdream)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/make-a-field-required/#post-5539464)
 * You are welcome! I’m glad you were able to make it work.

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘Make a field Required’ is closed to new replies.

 * ![](https://ps.w.org/bp-profile-search/assets/icon.svg?rev=1568973)
 * [BP Profile Search](https://wordpress.org/plugins/bp-profile-search/)
 * [Support Threads](https://wordpress.org/support/plugin/bp-profile-search/)
 * [Active Topics](https://wordpress.org/support/plugin/bp-profile-search/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/bp-profile-search/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/bp-profile-search/reviews/)

 * 6 replies
 * 3 participants
 * Last reply from: [Andrea Tarantini](https://wordpress.org/support/users/dontdream/)
 * Last activity: [11 years, 3 months ago](https://wordpress.org/support/topic/make-a-field-required/#post-5539464)
 * Status: resolved