PLEASE NOTE: These forums are no longer utilized and are provided as an archive for informational purposes only. All support issues will be handled via email using our support ticket system. For more detailed information on this change, please see this blog post.

Address formatting other than for the US

  1. Hi.
    I expect Rocket Genius is based in the US, and that a large percentage of users are based in the U.S.. However, I am sure there are still quite a few non-US users out there!
    The question about how you format the address and phone numbers has been mentioned before, but I just wanted some clarification.
    With the phone number formatting you can choose between the standard (I am assuming US one) and "international". I take a bit of an issue with that in that being based in the UK, the U.S. one is the international one! It would be great if there was a "location settings" option in Gravity Forms where I can say that the website is based in the UK locale. That way it would default to a UK telephone number format. It would be really useful for there to be more options here, for example:
    US Telephone
    UK telephone
    German telephone
    Custom telephone
    With the latter "custom" giving you the option to create the format yourself. It would be cool if you could add "plugins" for these.

    The same goes for the address. It's geared towards the US market again- giving a list of states and mentioning "zip code". Can the address box not be customised? It would be great if you could choose from (for example):
    Address 1
    Address 2
    Address 3
    Address 4
    Town
    Postal Town
    City
    County
    State
    Postal Code
    Zip Code
    Country

    A list of states is no good for a non-US address, and it would be good to be able to use a list of counties or other regional area (again making plugins available for this would be useful so that users can build their own)
    I suppose the best system would be for the person filling in the form to select their country, and the form changing to the correct address formatting for that country.

    Sorry that this is a long rambled message, but I do feel this is really important! Please feel sorry for all of us outside of the United States. We are important and we're quite nice really! ;-)

    Thanks.

    Posted 8 years ago on Wednesday October 26, 2011 | Permalink
  2. Base5Designs
    Member

    Just purchased gravity forms developer license.

    I am amazed there is no locale settings for phone numbers, post codes or for prepoulating form fields with data for the "rest" of the world.

    Oh well i guess its like having the world series where only america is allowed to play (although that might of changed now, i dont follow baseball)

    Posted 8 years ago on Thursday October 27, 2011 | Permalink
  3. It's been a couple of months since I first posted this question and no answers. I know I am not the only non-US person who finds this frustrating (thanks @Base5Designs!). A way of properly formatting the address really needs to be addressed in Gravity Forms- for me it is a deal breaker. I am so, so tempted to purchase the Developer edition, but since the majority of my sites are either UK based or need to accept addresses from the whole of the world, the inflexibility of the US-only address format is not going to help.

    I'd be very grateful if someone from Gravity forms could give me some feedback to this.

    Posted 7 years ago on Wednesday December 7, 2011 | Permalink
  4. We have an extremely larger number of non-U.S. based customers, which is why i'm a bit confused as to all the confusion surrounding this functionality.

    The solution for your Phone Number issues is to use the Single Input field and the Input Mask functionality. You can then create whatever phone number input format you want and it will implement it with an input mask to guide the user.

    If we had to do it over again we wouldn't have introduced a phone number field we would have relied solely on the Single Input and input masks.

    As for the Address field, there are multiple Address Types built in. When you add and edit your Address Field you select the Address Type.

    So i'm a little confused as to why you would think you HAVE to have a drop down list of U.S. States when obviously U.S. States only applies to the U.S. You select the address type when configuring the field.

    Here is an international address type:

    http://dl.dropbox.com/u/185347/Slingshot/Pictures/Screen%20Shot%202011-12-07%20at%2012.52.25%20PM.png

    Here is a the U.S. address type:

    http://dl.dropbox.com/u/185347/Slingshot/Pictures/Screen%20Shot%202011-12-07%20at%2012.56.14%20PM.png

    The international address type isn't country specific. It does have a zip code field but it's labeled as Zip / Postal Code because some countries refer to it differently. Same goes with the State/Province/Region input.

    This is pretty standard formatting and terminology for a set of fields designed to capture address information when you don't know the country of origin of the user filling out the information.

    As for can it be customized... of course it can be customized. There are a variety of built in field options that can be configured. Whatever can't be customized via the form builder UI and built in options, you can customize further using hooks and filters. Gravity Forms is extremely customizable.

    Don't like the built in labels that are used? Change them using filters:
    http://www.gravityhelp.com/documentation/page/Developer_Docs#Sublabels

    Don't like the build in default address types? Create your own:
    http://www.gravityhelp.com/documentation/page/Gform_address_types

    We can't provide GUI for every single use case, but that doesn't mean it can't be customized to do what you want it to do.

    Again, i'm not sure where the perception that we aren't international friendly is coming from. We have an extremely large international user base and this has never been an issue.

    Posted 7 years ago on Wednesday December 7, 2011 | Permalink
  5. Quite simply there isn't appropriate signposting to this documentation, I'm an 'international' user too and it took me a good ten - fifteen minutes to track this info down. Why not make a link to customisation options from the address marketing stuff?

    Thanks!

    p.s. just done a very complex application form for a client - they are absolutely delighted and I'm blown away by how straightforward it was. Made back the money (and considerably more) for the license on my first job ;-) Cheers!!

    Posted 7 years ago on Wednesday December 28, 2011 | Permalink
  6. @Mungo What specific information or issue are you referring to so we can see what we can do to update the documentation or Gravity Forms itself so it's easier to resolve?

    The Address Field itself defaults to a standard International format that is pretty much an industry standard as far as form builders go. While it does have fields for State and Zip Code, those fields are labeled so they have international context and can typically be used for most countries (ex. the zip code field is labeled Zip / Postal Code and the state field is labeled State / Province / Region).

    The International address type isn't designed to be country specific, there are far too many countries and different regional ways of handling things. We just went with the standard format for addresses.

    You can then customize and create your own custom Address Type that incorporates just the fields you want and the labels you want using hooks.

    It's a similar situation with the Phone Field. However, with the inclusion of javascript input masks for the Single Input field it can easily be more useful for capturing phone number information than the Phone Field itself. If we could do it over again we probably would just use the Single Input field with masks rather than having a dedicated Phone Field.

    Posted 7 years ago on Wednesday December 28, 2011 | Permalink
  7. I would like to confirm exactly where to put this code so it doesn't get overwritten when i update the Gravity forms plugin?

    add_filter("gform_address_types", "aus_address", 10, 2);
    function aus_address($address_types, $form_id){
    $address_types["australia"] = array(
    "label" => "Australia",
    "country" => "Australia",
    "zip_label" => "Postcode",
    "state_label" => "State",
    "states" => array("NT"=>"NT", "ACT"=>"ACT","NSW"=>"NSW", "QLD"=>"QLD", "VIC"=>"VIC", "WA"=>"WA","SA"=>"SA", "TAS" => "TAS")
    );
    return $address_types;
    }
    Posted 7 years ago on Monday January 9, 2012 | Permalink
  8. This code goes in your theme's functions.php file. Here is an explanation:

    http://www.gravityhelp.com/documentation/page/Where_Do_I_Put_This_Code%3F

    Posted 7 years ago on Tuesday January 10, 2012 | Permalink
  9. I've tried using both the Address Type and Address State method to edit the way my address appears on the form but can't seem to get it working.

    <?php
    add_filter("gform_address_state", "change_address_state", 10, 2);
    function change_address_state($label, $form_id){
        return "Address State";
    }
    ?>

    &

    <?php
    add_filter("gform_address_types", "brazilian_address", 10, 2);
    
    function brazilian_address($address_types, $form_id){
        $address_types["brazil"] = array(
                                        "label" => "Brasil",
                                        "country" => "Brasil",
                                        "zip_label" => "CEP",
                                        "state_label" => "Estado",
                                        "states" => array("", "Acre", "Alagoas", "Amapa", "Amazonas","Bahia", "Ceara", "Distrito Federal", "Espirito Santo", "Goias", "Maranhao", "Mato Grosso", "Mato Grosso do Sul", "Minas Gerais", "Para", "Paraiba", "Parana", "Pernambuco", "Piaui", "Roraima", "Rondonia", "Rio de Janeiro", "Rio Grande do Norte", "Rio Grande do Sul", "Santa Catarina", "Sao Paulo", "Sergipe", "Tocantins")
        );
        return $address_types;
    }
    
    ?>

    I'm just testing locally at the minute. I've pasted these into the functions.php of my theme but nothing seems to happen - I did remove the extra ?php tags by the way.

    Not being very php savvy I'm stuck! hence the reason I'm paying for Gravity Forms. I really just need to edit the address labels so that it says 'county' instead of 'state/province etc'.
    I'm assuming I've missed something!

    Thanks
    Henry

    Posted 7 years ago on Thursday January 19, 2012 | Permalink
  10. @henrybag, please begin a new topic for your issue specifically with a link to your form. We try not to handle regular support in the pre-purchase forums. Please link to any relevant posts in the forums that show the code you're trying to implement. Thank you.

    Posted 7 years ago on Friday January 20, 2012 | Permalink

This topic has been resolved and has been closed to new replies.