ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Searching Entry By State

June 06, 2008 5:49pm

Subscribe [2]
  • #1 / Jun 06, 2008 5:49pm

    DisMedia

    16 posts

    I need to have a custom field for entries in a weblog that designates its “state” as in US territory.  One entry can have multiple states. 

    How would I create a field with 50 checkboxes for the states.  Has anyone done this before?  Is there a perfered method so coding a dropdown select box would be done easily?

    Thanks for your help!

  • #2 / Jun 06, 2008 5:58pm

    Rob Allen

    3114 posts

    The only way I can think of doing this is to use categories for the states - this would allow you to pick multiple ones

  • #3 / Jun 06, 2008 6:03pm

    Ingmar

    29245 posts

    I could think of a couple of ways if you only needed one state (as in, say, an address), but if you need multiple, I think categories are the best solution.

  • #4 / Jun 06, 2008 6:06pm

    DisMedia

    16 posts

    Thanks bluedreamer.  That would probably work in most intances.  In this case I have top level categories already assigned.

  • #5 / Jun 06, 2008 6:34pm

    DisMedia

    16 posts

    Ingmar.  How would you do it if it were one entry = one state?

  • #6 / Jun 06, 2008 6:37pm

    Ingmar

    29245 posts

    I think a custom field {state} should work, together with the weblog search= prameter, eg. Even if you are using categories for other purposes, you could still use them for states, though; you can assign an entry to many categoies, after all.

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases