• toofpic@lemmy.world
    link
    fedilink
    English
    arrow-up
    15
    arrow-down
    2
    ·
    14 days ago

    I kind of agree, but Country, really? They know most services can be used outside the US? A great way would be to choose a country (okay, if the majority of users are from the US it can be preselected), then that country’s postal code list is used to fill in the rest of the fields (and as a fallback, you can enter unlosted code and address).
    I still remember some asshole American services telling me that “a postal code consists of 5 numbers” (I’m from Europe, and it’s 6 everywhere) - this is the result of going crazy on assumptions. Nice and convenient standardized systems can be built, but if you make one for an address on the planet, then start from Country and down, not from “I watched Beverly Hills 90210, this seems to work for me”

    • alsimoneau@lemmy.ca
      link
      fedilink
      English
      arrow-up
      4
      ·
      13 days ago

      Canada is 3 letters and 3 numbers, alternated. For example, Santa’s postal code is H0H 0H0 (this is real btw, he will answer in any language and the postage is free)

    • Ephera@lemmy.ml
      link
      fedilink
      English
      arrow-up
      3
      ·
      13 days ago

      Yeah, which is also the explanation why this isn’t implementented nearly as often as the author would like.
      The folks implementing these address input components probably puke already from just needing different sets of input fields and formats for different countries. If they have to call different APIs with different input and output formats for every country, that increases complexity quite a bit.

      • toofpic@lemmy.world
        link
        fedilink
        English
        arrow-up
        2
        arrow-down
        1
        ·
        12 days ago

        Ok, thank you for your input, it matters a lot in the context of the conversation.

          • toofpic@lemmy.world
            link
            fedilink
            English
            arrow-up
            1
            ·
            12 days ago

            You didn’t offend me but your comment is completely useless. Ok, you corrected me, allegedly not all of European countries use 6-digit codes. But how does it add to the discussion?

            • SchwertImStein@lemmy.dbzer0.com
              link
              fedilink
              English
              arrow-up
              1
              ·
              12 days ago

              That a check “if EU then 6 digits” would also be wrong. You should allow the user to put whatever they want as the zip code (ofc with some sane limit of max chars).

              • toofpic@lemmy.world
                link
                fedilink
                English
                arrow-up
                1
                ·
                11 days ago

                Read my comment. Where do I imply I will take 6 digits? I wrote: choose country, then enter that country’s postcode in order the other data to be fetched. And I even wrote about a fallback (for the case there is no postcode/address data for that country, so we just allow the user to enter whatever they want).

    • hikaru755@lemmy.world
      link
      fedilink
      English
      arrow-up
      1
      ·
      13 days ago

      I agree they probably should’ve addressed that in the main post, but at least it’s in the caveats below:

      Fine, maybe country first. The purists in the comments are technically correct — postal codes aren’t globally unique. You could do country first (pre-filled via IP), then postal code, then let the magic happen. The point was never “skip the country field.” The point is: stop making me type things you already know.

      • toofpic@lemmy.world
        link
        fedilink
        English
        arrow-up
        1
        ·
        13 days ago

        This makes sense. I’m of course not against the very idea. It’s just from the main text it looks like they plan to be systematic, and then immediately jump to step 2/5/… :)

  • cazssiew@lemmy.world
    link
    fedilink
    English
    arrow-up
    9
    ·
    13 days ago

    This is completely broken anywhere outside the US. I’m thinking the author knows this, but if he acknowledges it, his entire point about it being easy to implement goes away. For it to work internationally, you’d have to first ask for the country, then individually point each answer to a different postal code database, down to the smallest nation, supposing that such a database is even publicly available for every nation on earth.

  • Xavienth@lemmygrad.ml
    link
    fedilink
    English
    arrow-up
    4
    ·
    14 days ago

    I tried their demo. It didn’t let me input my postal code because it’s 7 characters. It would have been even worse if the field only accepted numbers like the author implies it should. I obviously didn’t expect it to auto fill, but the fact that I can’t even input my postal code at all is the same annoyance I’ve had with almost every American service. The fact that there’s even a field for “country” in the demo is a joke. If you’re going to make your form for the US only, why bother including a country field? If it is international, country goes first, I don’t know why that’s even a concession at the end of the article, it should be the foundation.

    Also the suggestion to auto fill the country based on IP has problems but I would go out on a limb and say most people are not travelling or using a VPN so I’ll let this slide.

  • alsimoneau@lemmy.ca
    link
    fedilink
    English
    arrow-up
    4
    ·
    13 days ago

    This is dumb. It’s like when they ask you for your zip code to put in some gas. I’m Canadian, I don’t have a zip code! Ours is 6 long with letters, so the whole thing breaks. (I know about the 00 trick)

  • PieMePlenty@lemmy.world
    link
    fedilink
    English
    arrow-up
    4
    arrow-down
    2
    ·
    edit-2
    13 days ago

    Falls apart when you accept worldwide addresses.
    75001 - Am I in Texas or France?
    20001 - Am I in Washington or Algeria or Spain?
    10115 - Am I in New York or Germany or Dominican Republic?
    I guess you could compliment that with IP geolocation and now you suddenly have an address entry form with dependencies up the wazoo and can probably push it on its own repo. Thousands of lines of code, servers processing, ice glaciers melting just so I don’t have to type in that I am from Fucking, Austria.

      • PieMePlenty@lemmy.world
        link
        fedilink
        English
        arrow-up
        2
        ·
        13 days ago

        I’ve literally never prefixed a country code to a postal code and I’ve successfully sent over 300 letters and packages from sales on CardMarket and over 200 packages from sales on Ebay (all to EU). The country was always the last line in the address. I’ve also never done this for my own address, but I’ve seen it done yes. Particularly when an online merchant did it for me. Its a far cry from saying we do this in Europe. Its an exception rather than a rule.

  • kungfuratte@feddit.org
    link
    fedilink
    English
    arrow-up
    1
    ·
    13 days ago

    I tried the little tool and entered my five digit zip code. It falsely located me in the US. 😉

    Jokes aside: generally the guy is not wrong. Address forms should help users by pre-filling as much information as possible.

    • triplenadir@lemmygrad.ml
      link
      fedilink
      English
      arrow-up
      1
      ·
      13 days ago

      When I saw “use a numeric input for ZIP code” I knew the author had no interest in the demo working outside the US.

      This correctly set my expectation that autocomplete wouldn’t work for an address inside the US either…