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.

Removing "Armed Forces" from State dropdown

  1. Minnie
    Member

    In the particular application I'm working on in the advanced "address" field, the use of "Armed Forces Americas", Europe, and Asia are not permitted for users to choose (U.S. Address format).

    Is it possible to delete those?

    Thanks.

    Posted 12 years ago on Wednesday March 7, 2012 | Permalink
  2. Minnie, you should be able to use this hook:

    http://www.gravityhelp.com/documentation/page/Gform_address_types

    And just list out the states you'd like to use there.

    Posted 12 years ago on Wednesday March 7, 2012 | Permalink
  3. Minnie
    Member

    Thanks, that seems clear.

    What isn't clear is something more basic. I don't see in the hooks section of documentation the basics of hooking.

    Does one edit a php file? Add a file? What keyword goes where to create this?
    Sorry, not working on this before, I don't have a handle (so to speak) on the process itself and it seems like the documentation assumes something I lack.

    Posted 12 years ago on Wednesday March 7, 2012 | Permalink
  4. No problem, you can place this into your theme's functions.php file.

    Posted 12 years ago on Wednesday March 7, 2012 | Permalink
  5. Minnie
    Member

    Cool, I just edited the three "Armed forces..." out of the common.php file in your theme folder out of the state array list to do the job.

    Do I assume correctly that common.php will be overwritten by future updates?

    Posted 12 years ago on Wednesday March 7, 2012 | Permalink
  6. Yeah it will, so you'll just want to make a note of that.

    Posted 12 years ago on Thursday March 8, 2012 | Permalink