• Resolved twhitaker

    (@twhitaker)


    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.
Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Roland Barker

    (@xnau)

    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

    (@twhitaker)

    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.
Viewing 2 replies - 1 through 2 (of 2 total)

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