Title: Searching by zipcode
Last modified: March 19, 2020

---

# Searching by zipcode

 *  Resolved [twhitaker](https://wordpress.org/support/users/twhitaker/)
 * (@twhitaker)
 * [6 years, 2 months ago](https://wordpress.org/support/topic/searching-by-zipcode/)
 * Hi Roland,
 * Many thanks for this great plugin. Running into a road block on a potential use
   case and wondering if you can provide any tips. I have a spreadsheet of 100 candidates
   all running for different elections (city council up to Governor) and I also 
   have every zip code in each of those districts in a “district_zips” column.
 * I’m hoping to use PDB to dynamically show which candidates are running in each
   zip code through a search. This short code:
 * [pdb_list search= true search_fields=”district_zips” suppress=true
 * works really well for city council, state house, and state senate districts when
   I only need to have a 4 or 5 zip code options in a field. The problem I’m running
   into is that Congressional and statewide races are going to have hundreds of 
   potential zip codes and it looks like the text field maxes out at a certain number
   of characters.
 * Do you have any tips for me by chance? Is there an add-on that might help with
   this? Currently I’m thinking I’ll need to restructure the data so that each row
   is a zip code rather than a candidate, but curious if you might have any other
   ideas.
 * Cheers,
    Thomas
    -  This topic was modified 6 years, 2 months ago by [twhitaker](https://wordpress.org/support/users/twhitaker/).

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

 *  Plugin Author [Roland Barker](https://wordpress.org/support/users/xnau/)
 * (@xnau)
 * [6 years, 2 months ago](https://wordpress.org/support/topic/searching-by-zipcode/#post-12562156)
 * The simplest fix for this is probably to switch to using a text-area field for
   your zip codes if there are going to be a lot of them stored in a record. That
   will give you plenty of room for the data.
 * You could also alter the database itself, change the datatype for the zip code
   field to LONGTEXT, which will give you a ton of room to store in that field. 
   This would happen in the main PDB table, named wp_participant_database.
 *  Thread Starter [twhitaker](https://wordpress.org/support/users/twhitaker/)
 * (@twhitaker)
 * [6 years, 2 months ago](https://wordpress.org/support/topic/searching-by-zipcode/#post-12565654)
 * Hi Roland,
 * Changing the field to text-area did the trick. Very helpful, thank you!
    -  This reply was modified 6 years, 2 months ago by [twhitaker](https://wordpress.org/support/users/twhitaker/).

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

The topic ‘Searching by zipcode’ is closed to new replies.

 * ![](https://ps.w.org/participants-database/assets/icon-256x256.jpg?rev=1389807)
 * [Participants Database](https://wordpress.org/plugins/participants-database/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/participants-database/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/participants-database/)
 * [Active Topics](https://wordpress.org/support/plugin/participants-database/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/participants-database/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/participants-database/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [twhitaker](https://wordpress.org/support/users/twhitaker/)
 * Last activity: [6 years, 2 months ago](https://wordpress.org/support/topic/searching-by-zipcode/#post-12565654)
 * Status: resolved