Title: Filter with Dropdown Menu
Last modified: August 21, 2016

---

# Filter with Dropdown Menu

 *  [AaronCEC](https://wordpress.org/support/users/aaroncec/)
 * (@aaroncec)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/filter-with-dropdown-menu/)
 * I am using CFDB 2.8 (just updated) in order to take advantage of the filter tools.
 * What I would like to do is have a select box that shows all of the “location”
   options for my results. Once selected I would like it to show only the information
   for that specific location. My thoughts were that I would do the following:
 *  – Create multiple cfdb-table shortcodes with filter attributes for each location.
   –
   Use JS or PHP and a select box to show the appropriate shortcode.
 * I’ve tried to follow the Filter directions here: [http://cfdbplugin.com/?page_id=1073](http://cfdbplugin.com/?page_id=1073)
 * I’ve added in the new attribute that was demonstrated:
 *     ```
       filter=”strpos(location,Atlanta)>1″
       ```
   
 * I also added in the Add Actions and Filter Plugin and added the following code
   there:
 *     ```
       require_once(ABSPATH . 'wp-content/plugins/contact-form-7-to-database-extension/CFDBPermittedFunctions.php');
   
       cfdb_register_function('strpos');
       ```
   
 * Am I going down the right path? Any guidance to achieve my objective would be
   appreciated!
 * [https://wordpress.org/plugins/contact-form-7-to-database-extension/](https://wordpress.org/plugins/contact-form-7-to-database-extension/)

The topic ‘Filter with Dropdown Menu’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/contact-form-7-to-database-extension_ffffff.
   svg)
 * [Contact Form DB](https://wordpress.org/plugins/contact-form-7-to-database-extension/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/contact-form-7-to-database-extension/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/contact-form-7-to-database-extension/)
 * [Active Topics](https://wordpress.org/support/plugin/contact-form-7-to-database-extension/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/contact-form-7-to-database-extension/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/contact-form-7-to-database-extension/reviews/)

## Tags

 * [database](https://wordpress.org/support/topic-tag/database/)
 * [drop-down](https://wordpress.org/support/topic-tag/drop-down/)
 * [wpcf7](https://wordpress.org/support/topic-tag/wpcf7/)

 * 0 replies
 * 1 participant
 * Last reply from: [AaronCEC](https://wordpress.org/support/users/aaroncec/)
 * Last activity: [11 years, 11 months ago](https://wordpress.org/support/topic/filter-with-dropdown-menu/)
 * Status: not resolved