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.

Custom field group question

March 17, 2008 4:26pm

Subscribe [4]
  • #1 / Mar 17, 2008 4:26pm

    kelseyads2

    98 posts

    I’m working on a website for a self storage complex and I’m creating a custom group for locations.

    My question:

    Should I create one text field for “Address” or multiple text fields, one for “Street Address”, “City”, “State”, “Zip”, etc.

    Are there any real benefits to having independent fields? How have you used addresses in custom field groups?

  • #2 / Mar 18, 2008 10:17am

    e-man

    1816 posts

    There’s no cut and dry answer to this, it all depends on your needs.
    Consider the difference between:

    <address>{address}</address>

    and

    <dl>
        <dt>{name}</dt>
            <dd>{street}</dd>
            <dd>{city}</dd>
            <dd>{tel_nr}</dd>
    </dl>

    In the first example you can get away with 1 custom field, in the other you might need the added flexibility of more custom fields. Your call 😊

  • #3 / Mar 18, 2008 10:43am

    Ingmar

    29245 posts

    I almost always use multiple fields. Quite often, there’s something down the line which you didn’t need at first (sorting by zip, distance calculation, etc.)

  • #4 / Mar 18, 2008 10:51am

    ms

    274 posts

    As e-man pointed out, there is no final answer. Regarding the benefits: If you need to guarantee that some detailed information is entered (verification) or if you want to be able to compare, sort or otherwise evaluate or reuse details, then a separate custom field (perhaps with formatting set to ‘none’) is useful. If the information is just informal, it is much easier to enter them in a single textarea field.

    -Markus

    Edit: Ingmar was faster 😉

  • #5 / Mar 19, 2008 10:13am

    kelseyads2

    98 posts

    Thanks guys, I think I’ll use multiple fields.

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

ExpressionEngine News!

#eecms, #events, #releases