Answers.Body: <p>This is not the answer you were looking for, but if you decide to just go with a normal drop-down, then you can paste the following into the dropdown field in the database. This would go in the <code>craft_fields</code> table, <code>yourCountryField</code> row, <code>settings</code> column. After editing the list the way you need it I would suggest removing all line-breaks using grep find/replace ('\n', ''), but it may not matter either.</p>
  
  <pre><code>{"options":[
  {"label":"Afghanistan","value":"AF","default":""},
  {"label":"Aland Islands","value":"AX","default":""},
  {"label":"Albania","value":"AL","default":""},
  {"label":"Algeria","value":"DZ","default":""},
  {"label":"American Samoa","value":"AS","default":""},
  {"label":"Andorra","value":"AD","default":""},
  {"label":"Angola","value":"AO","default":""},
  {"label":"Anguilla","value":"AI","default":""},
  {"label":"Antarctica","value":"AQ","default":""},
  {"label":"Antigua and Barbuda","value":"AG","default":""},
  {"label":"Argentina","value":"AR","default":""},
  {"label":"Armenia","value":"AM","default":""},
  {"label":"Aruba","value":"AW","default":""},
  {"label":"Australia","value":"AU","default":""},
  {"label":"Austria","value":"AT","default":""},
  {"label":"Azerbaijan","value":"AZ","default":""},
  {"label":"Bahamas","value":"BS","default":""},
  {"label":"Bahrain","value":"BH","default":""},
  {"label":"Bangladesh","value":"BD","default":""},
  {"label":"Barbados","value":"BB","default":""},
  {"label":"Belarus","value":"BY","default":""},
  {"label":"Belgium","value":"BE","default":""},
  {"label":"Belize","value":"BZ","default":""},
  {"label":"Benin","value":"BJ","default":""},
  {"label":"Bermuda","value":"BM","default":""},
  {"label":"Bhutan","value":"BT","default":""},
  {"label":"Bolivia","value":"BO","default":""},
  {"label":"Bosnia and Herzegovina","value":"BA","default":""},
  {"label":"Botswana","value":"BW","default":""},
  {"label":"Bouvet Island","value":"BV","default":""},
  {"label":"Brazil","value":"BR","default":""},
  {"label":"British Indian Ocean Territory","value":"IO","default":""},
  {"label":"Brunei Darussalam","value":"BN","default":""},
  {"label":"Bulgaria","value":"BG","default":""},
  {"label":"Burkina Faso","value":"BF","default":""},
  {"label":"Burundi","value":"BI","default":""},
  {"label":"Cambodia","value":"KH","default":""},
  {"label":"Cameroon","value":"CM","default":""},
  {"label":"Canada","value":"CA","default":""},
  {"label":"Cape Verde","value":"CV","default":""},
  {"label":"Cayman Islands","value":"KY","default":""},
  {"label":"Central African Republic","value":"CF","default":""},
  {"label":"Chad","value":"TD","default":""},
  {"label":"Chile","value":"CL","default":""},
  {"label":"China","value":"CN","default":""},
  {"label":"Christmas Island","value":"CX","default":""},
  {"label":"Cocos (Keeling) Islands","value":"CC","default":""},
  {"label":"Colombia","value":"CO","default":""},
  {"label":"Comoros","value":"KM","default":""},
  {"label":"Congo","value":"CG","default":""},
  {"label":"Congo, The Democratic Republic of the","value":"CD","default":""},
  {"label":"Cook Islands","value":"CK","default":""},
  {"label":"Costa Rica","value":"CR","default":""},
  {"label":"Cote D'Ivoire","value":"CI","default":""},
  {"label":"Croatia","value":"HR","default":""},
  {"label":"Cuba","value":"CU","default":""},
  {"label":"Cyprus","value":"CY","default":""},
  {"label":"Czech Republic","value":"CZ","default":""},
  {"label":"Denmark","value":"DK","default":""},
  {"label":"Djibouti","value":"DJ","default":""},
  {"label":"Dominica","value":"DM","default":""},
  {"label":"Dominican Republic","value":"DO","default":""},
  {"label":"Ecuador","value":"EC","default":""},
  {"label":"Egypt","value":"EG","default":""},
  {"label":"El Salvador","value":"SV","default":""},
  {"label":"Equatorial Guinea","value":"GQ","default":""},
  {"label":"Eritrea","value":"ER","default":""},
  {"label":"Estonia","value":"EE","default":""},
  {"label":"Ethiopia","value":"ET","default":""},
  {"label":"Falkland Islands (Malvinas)","value":"FK","default":""},
  {"label":"Faroe Islands","value":"FO","default":""},
  {"label":"Fiji","value":"FJ","default":""},
  {"label":"Finland","value":"FI","default":""},
  {"label":"France","value":"FR","default":""},
  {"label":"French Guiana","value":"GF","default":""},
  {"label":"French Polynesia","value":"PF","default":""},
  {"label":"French Southern Territories","value":"TF","default":""},
  {"label":"Gabon","value":"GA","default":""},
  {"label":"Gambia","value":"GM","default":""},
  {"label":"Georgia","value":"GE","default":""},
  {"label":"Germany","value":"DE","default":""},
  {"label":"Ghana","value":"GH","default":""},
  {"label":"Gibraltar","value":"GI","default":""},
  {"label":"Greece","value":"GR","default":""},
  {"label":"Greenland","value":"GL","default":""},
  {"label":"Grenada","value":"GD","default":""},
  {"label":"Guadeloupe","value":"GP","default":""},
  {"label":"Guam","value":"GU","default":""},
  {"label":"Guatemala","value":"GT","default":""},
  {"label":"Guernsey","value":"GG","default":""},
  {"label":"Guinea","value":"GN","default":""},
  {"label":"Guinea-Bissau","value":"GW","default":""},
  {"label":"Guyana","value":"GY","default":""},
  {"label":"Haiti","value":"HT","default":""},
  {"label":"Heard Island and Mcdonald Islands","value":"HM","default":""},
  {"label":"Holy See (Vatican City State)","value":"VA","default":""},
  {"label":"Honduras","value":"HN","default":""},
  {"label":"Hong Kong","value":"HK","default":""},
  {"label":"Hungary","value":"HU","default":""},
  {"label":"Iceland","value":"IS","default":""},
  {"label":"India","value":"IN","default":""},
  {"label":"Indonesia","value":"ID","default":""},
  {"label":"Iran, Islamic Republic Of","value":"IR","default":""},
  {"label":"Iraq","value":"IQ","default":""},
  {"label":"Ireland","value":"IE","default":""},
  {"label":"Isle of Man","value":"IM","default":""},
  {"label":"Israel","value":"IL","default":""},
  {"label":"Italy","value":"IT","default":""},
  {"label":"Jamaica","value":"JM","default":""},
  {"label":"Japan","value":"JP","default":""},
  {"label":"Jersey","value":"JE","default":""},
  {"label":"Jordan","value":"JO","default":""},
  {"label":"Kazakhstan","value":"KZ","default":""},
  {"label":"Kenya","value":"KE","default":""},
  {"label":"Kiribati","value":"KI","default":""},
  {"label":"Korea, Democratic People's Republic of","value":"KP","default":""},
  {"label":"Korea, Republic of","value":"KR","default":""},
  {"label":"Kuwait","value":"KW","default":""},
  {"label":"Kyrgyzstan","value":"KG","default":""},
  {"label":"Lao People's Democratic Republic","value":"LA","default":""},
  {"label":"Latvia","value":"LV","default":""},
  {"label":"Lebanon","value":"LB","default":""},
  {"label":"Lesotho","value":"LS","default":""},
  {"label":"Liberia","value":"LR","default":""},
  {"label":"Libyan Arab Jamahiriya","value":"LY","default":""},
  {"label":"Liechtenstein","value":"LI","default":""},
  {"label":"Lithuania","value":"LT","default":""},
  {"label":"Luxembourg","value":"LU","default":""},
  {"label":"Macao","value":"MO","default":""},
  {"label":"Macedonia, The Former Yugoslav Republic of","value":"MK","default":""},
  {"label":"Madagascar","value":"MG","default":""},
  {"label":"Malawi","value":"MW","default":""},
  {"label":"Malaysia","value":"MY","default":""},
  {"label":"Maldives","value":"MV","default":""},
  {"label":"Mali","value":"ML","default":""},
  {"label":"Malta","value":"MT","default":""},
  {"label":"Marshall Islands","value":"MH","default":""},
  {"label":"Martinique","value":"MQ","default":""},
  {"label":"Mauritania","value":"MR","default":""},
  {"label":"Mauritius","value":"MU","default":""},
  {"label":"Mayotte","value":"YT","default":""},
  {"label":"Mexico","value":"MX","default":""},
  {"label":"Micronesia, Federated States of","value":"FM","default":""},
  {"label":"Moldova, Republic of","value":"MD","default":""},
  {"label":"Monaco","value":"MC","default":""},
  {"label":"Mongolia","value":"MN","default":""},
  {"label":"Montserrat","value":"MS","default":""},
  {"label":"Morocco","value":"MA","default":""},
  {"label":"Mozambique","value":"MZ","default":""},
  {"label":"Myanmar","value":"MM","default":""},
  {"label":"Namibia","value":"NA","default":""},
  {"label":"Nauru","value":"NR","default":""},
  {"label":"Nepal","value":"NP","default":""},
  {"label":"Netherlands","value":"NL","default":""},
  {"label":"Netherlands Antilles","value":"AN","default":""},
  {"label":"New Caledonia","value":"NC","default":""},
  {"label":"New Zealand","value":"NZ","default":""},
  {"label":"Nicaragua","value":"NI","default":""},
  {"label":"Niger","value":"NE","default":""},
  {"label":"Nigeria","value":"NG","default":""},
  {"label":"Niue","value":"NU","default":""},
  {"label":"Norfolk Island","value":"NF","default":""},
  {"label":"Northern Mariana Islands","value":"MP","default":""},
  {"label":"Norway","value":"NO","default":""},
  {"label":"Oman","value":"OM","default":""},
  {"label":"Pakistan","value":"PK","default":""},
  {"label":"Palau","value":"PW","default":""},
  {"label":"Palestinian Territory, Occupied","value":"PS","default":""},
  {"label":"Panama","value":"PA","default":""},
  {"label":"Papua New Guinea","value":"PG","default":""},
  {"label":"Paraguay","value":"PY","default":""},
  {"label":"Peru","value":"PE","default":""},
  {"label":"Philippines","value":"PH","default":""},
  {"label":"Pitcairn","value":"PN","default":""},
  {"label":"Poland","value":"PL","default":""},
  {"label":"Portugal","value":"PT","default":""},
  {"label":"Puerto Rico","value":"PR","default":""},
  {"label":"Qatar","value":"QA","default":""},
  {"label":"Reunion","value":"RE","default":""},
  {"label":"Romania","value":"RO","default":""},
  {"label":"Russian Federation","value":"RU","default":""},
  {"label":"Rwanda","value":"RW","default":""},
  {"label":"Saint Helena","value":"SH","default":""},
  {"label":"Saint Kitts and Nevis","value":"KN","default":""},
  {"label":"Saint Lucia","value":"LC","default":""},
  {"label":"Saint Pierre and Miquelon","value":"PM","default":""},
  {"label":"Saint Vincent and the Grenadines","value":"VC","default":""},
  {"label":"Samoa","value":"WS","default":""},
  {"label":"San Marino","value":"SM","default":""},
  {"label":"Sao Tome and Principe","value":"ST","default":""},
  {"label":"Saudi Arabia","value":"SA","default":""},
  {"label":"Senegal","value":"SN","default":""},
  {"label":"Serbia and Montenegro","value":"CS","default":""},
  {"label":"Seychelles","value":"SC","default":""},
  {"label":"Sierra Leone","value":"SL","default":""},
  {"label":"Singapore","value":"SG","default":""},
  {"label":"Slovakia","value":"SK","default":""},
  {"label":"Slovenia","value":"SI","default":""},
  {"label":"Solomon Islands","value":"SB","default":""},
  {"label":"Somalia","value":"SO","default":""},
  {"label":"South Africa","value":"ZA","default":""},
  {"label":"South Georgia and the South Sandwich Islands","value":"GS","default":""},
  {"label":"Spain","value":"ES","default":""},
  {"label":"Sri Lanka","value":"LK","default":""},
  {"label":"Sudan","value":"SD","default":""},
  {"label":"Suriname","value":"SR","default":""},
  {"label":"Svalbard and Jan Mayen","value":"SJ","default":""},
  {"label":"Swaziland","value":"SZ","default":""},
  {"label":"Sweden","value":"SE","default":""},
  {"label":"Switzerland","value":"CH","default":""},
  {"label":"Syrian Arab Republic","value":"SY","default":""},
  {"label":"Taiwan, Province of China","value":"TW","default":""},
  {"label":"Tajikistan","value":"TJ","default":""},
  {"label":"Tanzania, United Republic of","value":"TZ","default":""},
  {"label":"Thailand","value":"TH","default":""},
  {"label":"Timor-Leste","value":"TL","default":""},
  {"label":"Togo","value":"TG","default":""},
  {"label":"Tokelau","value":"TK","default":""},
  {"label":"Tonga","value":"TO","default":""},
  {"label":"Trinidad and Tobago","value":"TT","default":""},
  {"label":"Tunisia","value":"TN","default":""},
  {"label":"Turkey","value":"TR","default":""},
  {"label":"Turkmenistan","value":"TM","default":""},
  {"label":"Turks and Caicos Islands","value":"TC","default":""},
  {"label":"Tuvalu","value":"TV","default":""},
  {"label":"Uganda","value":"UG","default":""},
  {"label":"Ukraine","value":"UA","default":""},
  {"label":"United Arab Emirates","value":"AE","default":""},
  {"label":"United Kingdom","value":"GB","default":""},
  {"label":"United States","value":"US","default":""},
  {"label":"United States Minor Outlying Islands","value":"UM","default":""},
  {"label":"Uruguay","value":"UY","default":""},
  {"label":"Uzbekistan","value":"UZ","default":""},
  {"label":"Vanuatu","value":"VU","default":""},
  {"label":"Venezuela","value":"VE","default":""},
  {"label":"Viet Nam","value":"VN","default":""},
  {"label":"Virgin Islands, British","value":"VG","default":""},
  {"label":"Virgin Islands, U.S.","value":"VI","default":""},
  {"label":"Wallis and Futuna","value":"WF","default":""},
  {"label":"Western Sahara","value":"EH","default":""},
  {"label":"Yemen","value":"YE","default":""},
  {"label":"Zambia","value":"ZM","default":""},
  {"label":"Zimbabwe","value":"ZW","default":""}
  ]}
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-01-16T19:25:13.450Z
Answers.Text: This is just what I was looking for :) thanks, ps working without removing line brakes
Answers.UserDisplayName: Davor
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-01-17T21:26:06.200Z
Answers.Text: Glad it worked @Davor. And thanks for the follow up on line breaks.
Answers.UserDisplayName: Douglas McDonald
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2018-03-19T15:52:03.817Z
Answers.Text: Ha, one of those times when you think 'It's a longshot but I'll just Google this before subjecting myself to this tedium...' So glad I did...
Answers.UserDisplayName: James Smith
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2014-11-04T22:38:07.067Z
Answers.LastActivityDate: 2014-11-04T22:43:42.597Z
Answers.LastEditDate: 2014-11-04T22:43:42.597Z
Answers.UserDisplayName: Douglas McDonald
Answers.Body: <p>This doesn't really address the problem either, but for anyone looking for "States" data (to replicate what Douglas McDonald did), here it is:</p>
  
  <pre><code>{"options":[{"label":"Alabama","value":"AL","default":""},{"label":"Alaska","value":"AK","default":""},{"label":"Arizona","value":"AZ","default":""},{"label":"Arkansas","value":"AR","default":""},{"label":"California","value":"CA","default":""},{"label":"Colorado","value":"CO","default":""},{"label":"Connecticut","value":"CT","default":""},{"label":"Delaware","value":"DE","default":""},{"label":"District of Columbia","value":"DC","default":""},{"label":"Florida","value":"FL","default":""},{"label":"Georgia","value":"GA","default":""},{"label":"Hawaii","value":"HI","default":""},{"label":"Idaho","value":"ID","default":""},{"label":"Illinois","value":"IL","default":""},{"label":"Indiana","value":"IN","default":""},{"label":"Iowa","value":"IA","default":""},{"label":"Kansas","value":"KS","default":""},{"label":"Kentucky","value":"KY","default":""},{"label":"Louisiana","value":"LA","default":""},{"label":"Maine","value":"ME","default":""},{"label":"Maryland","value":"MD","default":""},{"label":"Massachusetts","value":"MA","default":""},{"label":"Michigan","value":"MI","default":""},{"label":"Minnesota","value":"MN","default":""},{"label":"Mississippi","value":"MS","default":""},{"label":"Missouri","value":"MO","default":""},{"label":"Montana","value":"MT","default":""},{"label":"Nebraska","value":"NE","default":""},{"label":"Nevada","value":"NV","default":""},{"label":"New Hampshire","value":"NH","default":""},{"label":"New Jersey","value":"NJ","default":""},{"label":"New Mexico","value":"NM","default":""},{"label":"New York","value":"NY","default":""},{"label":"North Carolina","value":"NC","default":""},{"label":"North Dakota","value":"ND","default":""},{"label":"Ohio","value":"OH","default":""},{"label":"Oklahoma","value":"OK","default":""},{"label":"Oregon","value":"OR","default":""},{"label":"Pennsylvania","value":"PA","default":""},{"label":"Rhode Island","value":"RI","default":""},{"label":"South Carolina","value":"SC","default":""},{"label":"South Dakota","value":"SD","default":""},{"label":"Tennessee","value":"TN","default":""},{"label":"Texas","value":"TX","default":""},{"label":"Utah","value":"UT","default":""},{"label":"Vermont","value":"VT","default":""},{"label":"Virginia","value":"VA","default":""},{"label":"Washington","value":"WA","default":""},{"label":"West Virginia","value":"WV","default":""},{"label":"Wisconsin","value":"WI","default":""},{"label":"Wyoming","value":"WY","default":""}]}
  </code></pre>
  
  <ol>
  <li>Create a dropdown field.</li>
  <li>Navigate to the <code>craft_fields</code> table</li>
  <li>Locate the row with your <code>states</code> handle</li>
  <li>Add the data to the <code>settings</code> column</li>
  <li><p>Output states in a dropdown</p>
  
  <pre><code>{% for state in craft.fields.getFieldByHandle('states').getFieldType.options %}
      &lt;option value="{{ state.value }}"&gt;{{ state.label }}&lt;/option&gt;
  {% endfor %}
  </code></pre></li>
  </ol>
  
  <p>Even better, create a reusable macro:
  <pre><code>
  {% macro stateDropdownOptions(currentState) %}
      &lt;option>Select One&lt;/option>
      {% for state in craft.fields.getFieldByHandle('states').getFieldType.options %}
          &lt;option value="{{ state.value }}"{{ currentState is defined and state.value == currentState ? ' selected' : '' }}>
              {{ state.label }}
          &lt;/option>
      {% endfor %}
  {% endmacro %}
  </pre></code></p>
  
  <p>and use it:</p>
  
  <pre><code>
  {% import 'macros/form' as formMacros %}
  
  ...
  
  &lt;select name="states">
      {{ formMacros.stateDropdownOptions(row.state) }}
  &lt;/select>
  
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-07-09T05:38:44.757Z
Answers.LastActivityDate: 2015-07-13T21:32:22.140Z
Answers.LastEditDate: 2015-07-13T21:32:22.140Z
Answers.UserDisplayName: Jarrett Barnett
Answers.Body: <p>Unfortunately the drop down options in <a href="http://straightupcraft.com/craft-plugins/territories-fieldtype" rel="nofollow">Territories Dropdown Plugin</a> are not automatically available in templates.
  It need to be accessed through a field on an element. You're currently trying to access it through 'entry' which i assume doesn't exist in your template (as you would have copied this part).</p>
  
  <p>eg. I'm using it on projects in my template:</p>
  
  <pre><code>{% for option in project.country.options %}
  &lt;option {% if option.selected %}selected="selected"{% endif %} value="{{ option }}"&gt;{{ option.label }}&lt;/option&gt;
  {% endfor %}
  </code></pre>
  
  <p>For me 'project' is an <a href="http://buildwithcraft.com/docs/fields" rel="nofollow">entry in my section</a> 'projects' which has been declared above and i have <a href="http://buildwithcraft.com/docs/fields" rel="nofollow">given it the field</a> 'country' of type 'Territories - Dropdown' in the admin panel.</p>
  
  <hr>
  
  <p>If you want to access the options with out an instance of an entry you'll still need to <a href="http://buildwithcraft.com/docs/fields" rel="nofollow">create a field</a> with the type 'Territories - Dropdown'. Then replace 'country' in the code below with the handle you give your field.</p>
  
  <pre><code>{% for option in craft.fields.getFieldByHandle('country').getFieldType.options %}
  &lt;option value="{{ option }}"&gt;{{ option.label }}&lt;/option&gt;
  {% endfor %}
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-02-01T12:15:47.707Z
Answers.Text: Many thanks Jered for the example. I found that outputting {{ option }} caused an array to string conversion error and I needed to use {{ option.value }} instead of just {{ option }} to get this working.
Answers.UserDisplayName: Janine
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2014-12-10T06:45:10.660Z
Answers.LastActivityDate: 2014-12-10T08:00:36.353Z
Answers.LastEditDate: 2014-12-10T08:00:36.353Z
Answers.UserDisplayName: Jered Masters
Body: <p>So I'm using <a href="https://github.com/johndwells/craft.territories/" rel="nofollow">this territories plugin</a> to display a list of countries in a dropdown. The issue I'm having is showing these countries within my front-end entry form.</p>
  
  <p>I've used this example but it doesn't work:</p>
  
  <pre><code>{% for option in entry.territoryFieldHandle.options %}
      &lt;li {% if option.selected %}class="active"{% endif %}&gt;{{ option }}&lt;/li&gt;
  {% endfor %}
  </code></pre>
  
  <p>Here's my whole form. The other dropdowns work fine.</p>
  
  <pre><code>             {% set jobTypeDropdown = craft.fields.getFieldbyHandle('jobType') %}
          &lt;label for="fields[jobType]"&gt;Job Type&lt;/label&gt;
          &lt;select name="fields[jobType]"&gt;
              {% for option in jobTypeDropdown.settings.options %}
                  &lt;option value="{{ option.value }}"&gt;{{ option.label }}&lt;/option&gt;
              {% endfor %}
          &lt;/select&gt;
  
          {% set jobCategoryDropdown = craft.fields.getFieldbyHandle('jobCategory') %}
          &lt;label for="fields[jobCategory]"&gt;Job Category&lt;/label&gt;
          &lt;select name="fields[jobCategory]"&gt;
              {% for option in jobCategoryDropdown.settings.options %}
                  &lt;option value="{{ option.value }}"&gt;{{ option.label }}&lt;/option&gt;
              {% endfor %}
          &lt;/select&gt;
  
          &lt;label for="fields[country]"&gt;Country&lt;/label&gt;
          &lt;select name="fields[country]"&gt;
              {% for option in entry.country.options %}
                  &lt;option value="{{ option }}"&gt;{{ option }}&lt;/option&gt;
              {% endfor %}
          &lt;/select&gt;
  </code></pre>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2014-11-03T17:23:03.593Z
Comments.Text: Have you tried contacting the author?
Comments.UserDisplayName: Brad Bell
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2014-11-05T13:09:45.617Z
Comments.Text: Do you have an {{ entry }} variable available in the template scope? When you say it doesn't work, is it throwing an error or simply not rendering?
Comments.UserDisplayName: John D Wells
Tags: <entries><form><drop-down>
Title: Display list of countries in form using a dropdown
ThreadText: # Display list of countries in form using a dropdown
  
  (Asked by: username_0 on 2014-11-03)
  
  So I'm using [this territories plugin](https://github.com/username_2/craft.territories/) to display a list of countries in a dropdown. The issue I'm having is showing these countries within my front-end entry form.
  
  I've used this example but it doesn't work:
  
  ```
  {% for option in entry.territoryFieldHandle.options %}
      <li {% if option.selected %}class="active"{% endif %}>{{ option }}</li>
  {% endfor %}
  
  ```
  
  Here's my whole form. The other dropdowns work fine.
  
  ```
               {% set jobTypeDropdown = craft.fields.getFieldbyHandle('jobType') %}
          <label for="fields[jobType]">Job Type</label>
          <select name="fields[jobType]">
              {% for option in jobTypeDropdown.settings.options %}
                  <option value="{{ option.value }}">{{ option.label }}</option>
              {% endfor %}
          </select>
  
          {% set jobCategoryDropdown = craft.fields.getFieldbyHandle('jobCategory') %}
          <label for="fields[jobCategory]">Job Category</label>
          <select name="fields[jobCategory]">
              {% for option in jobCategoryDropdown.settings.options %}
                  <option value="{{ option.value }}">{{ option.label }}</option>
              {% endfor %}
          </select>
  
          <label for="fields[country]">Country</label>
          <select name="fields[country]">
              {% for option in entry.country.options %}
                  <option value="{{ option }}">{{ option }}</option>
              {% endfor %}
          </select>
  
  ```
  
  **Tags:** entries, form, drop-down
  
  > **Comments:**
  > **username_1**: Have you tried contacting the author?  
  > **username_2**: Do you have an {{ entry }} variable available in the template scope? When you say it doesn't work, is it throwing an error or simply not rendering?  
  
  ---
  
  ## 3 answers
  
  ### Answer by username_3 on 2014-11-04. Score: 12
  
  This is not the answer you were looking for, but if you decide to just go with a normal drop-down, then you can paste the following into the dropdown field in the database. This would go in the `craft_fields` table, `yourCountryField` row, `settings` column. After editing the list the way you need it I would suggest removing all line-breaks using grep find/replace ('\n', ''), but it may not matter either.
  
  ```
  {"options":[
  {"label":"Afghanistan","value":"AF","default":""},
  {"label":"Aland Islands","value":"AX","default":""},
  {"label":"Albania","value":"AL","default":""},
  {"label":"Algeria","value":"DZ","default":""},
  {"label":"American Samoa","value":"AS","default":""},
  {"label":"Andorra","value":"AD","default":""},
  {"label":"Angola","value":"AO","default":""},
  {"label":"Anguilla","value":"AI","default":""},
  {"label":"Antarctica","value":"AQ","default":""},
  {"label":"Antigua and Barbuda","value":"AG","default":""},
  {"label":"Argentina","value":"AR","default":""},
  {"label":"Armenia","value":"AM","default":""},
  {"label":"Aruba","value":"AW","default":""},
  {"label":"Australia","value":"AU","default":""},
  {"label":"Austria","value":"AT","default":""},
  {"label":"Azerbaijan","value":"AZ","default":""},
  {"label":"Bahamas","value":"BS","default":""},
  {"label":"Bahrain","value":"BH","default":""},
  {"label":"Bangladesh","value":"BD","default":""},
  {"label":"Barbados","value":"BB","default":""},
  {"label":"Belarus","value":"BY","default":""},
  {"label":"Belgium","value":"BE","default":""},
  {"label":"Belize","value":"BZ","default":""},
  {"label":"Benin","value":"BJ","default":""},
  {"label":"Bermuda","value":"BM","default":""},
  {"label":"Bhutan","value":"BT","default":""},
  {"label":"Bolivia","value":"BO","default":""},
  {"label":"Bosnia and Herzegovina","value":"BA","default":""},
  {"label":"Botswana","value":"BW","default":""},
  {"label":"Bouvet Island","value":"BV","default":""},
  {"label":"Brazil","value":"BR","default":""},
  {"label":"British Indian Ocean Territory","value":"IO","default":""},
  {"label":"Brunei Darussalam","value":"BN","default":""},
  {"label":"Bulgaria","value":"BG","default":""},
  {"label":"Burkina Faso","value":"BF","default":""},
  {"label":"Burundi","value":"BI","default":""},
  {"label":"Cambodia","value":"KH","default":""},
  {"label":"Cameroon","value":"CM","default":""},
  {"label":"Canada","value":"CA","default":""},
  {"label":"Cape Verde","value":"CV","default":""},
  {"label":"Cayman Islands","value":"KY","default":""},
  {"label":"Central African Republic","value":"CF","default":""},
  {"label":"Chad","value":"TD","default":""},
  {"label":"Chile","value":"CL","default":""},
  {"label":"China","value":"CN","default":""},
  {"label":"Christmas Island","value":"CX","default":""},
  {"label":"Cocos (Keeling) Islands","value":"CC","default":""},
  {"label":"Colombia","value":"CO","default":""},
  {"label":"Comoros","value":"KM","default":""},
  {"label":"Congo","value":"CG","default":""},
  {"label":"Congo, The Democratic Republic of the","value":"CD","default":""},
  {"label":"Cook Islands","value":"CK","default":""},
  {"label":"Costa Rica","value":"CR","default":""},
  {"label":"Cote D'Ivoire","value":"CI","default":""},
  {"label":"Croatia","value":"HR","default":""},
  {"label":"Cuba","value":"CU","default":""},
  {"label":"Cyprus","value":"CY","default":""},
  {"label":"Czech Republic","value":"CZ","default":""},
  {"label":"Denmark","value":"DK","default":""},
  {"label":"Djibouti","value":"DJ","default":""},
  {"label":"Dominica","value":"DM","default":""},
  {"label":"Dominican Republic","value":"DO","default":""},
  {"label":"Ecuador","value":"EC","default":""},
  {"label":"Egypt","value":"EG","default":""},
  {"label":"El Salvador","value":"SV","default":""},
  {"label":"Equatorial Guinea","value":"GQ","default":""},
  {"label":"Eritrea","value":"ER","default":""},
  {"label":"Estonia","value":"EE","default":""},
  {"label":"Ethiopia","value":"ET","default":""},
  {"label":"Falkland Islands (Malvinas)","value":"FK","default":""},
  {"label":"Faroe Islands","value":"FO","default":""},
  {"label":"Fiji","value":"FJ","default":""},
  {"label":"Finland","value":"FI","default":""},
  {"label":"France","value":"FR","default":""},
  {"label":"French Guiana","value":"GF","default":""},
  {"label":"French Polynesia","value":"PF","default":""},
  {"label":"French Southern Territories","value":"TF","default":""},
  {"label":"Gabon","value":"GA","default":""},
  {"label":"Gambia","value":"GM","default":""},
  {"label":"Georgia","value":"GE","default":""},
  {"label":"Germany","value":"DE","default":""},
  {"label":"Ghana","value":"GH","default":""},
  {"label":"Gibraltar","value":"GI","default":""},
  {"label":"Greece","value":"GR","default":""},
  {"label":"Greenland","value":"GL","default":""},
  {"label":"Grenada","value":"GD","default":""},
  {"label":"Guadeloupe","value":"GP","default":""},
  {"label":"Guam","value":"GU","default":""},
  {"label":"Guatemala","value":"GT","default":""},
  {"label":"Guernsey","value":"GG","default":""},
  {"label":"Guinea","value":"GN","default":""},
  {"label":"Guinea-Bissau","value":"GW","default":""},
  {"label":"Guyana","value":"GY","default":""},
  {"label":"Haiti","value":"HT","default":""},
  {"label":"Heard Island and username_3 Islands","value":"HM","default":""},
  {"label":"Holy See (Vatican City State)","value":"VA","default":""},
  {"label":"Honduras","value":"HN","default":""},
  {"label":"Hong Kong","value":"HK","default":""},
  {"label":"Hungary","value":"HU","default":""},
  {"label":"Iceland","value":"IS","default":""},
  {"label":"India","value":"IN","default":""},
  {"label":"Indonesia","value":"ID","default":""},
  {"label":"Iran, Islamic Republic Of","value":"IR","default":""},
  {"label":"Iraq","value":"IQ","default":""},
  {"label":"Ireland","value":"IE","default":""},
  {"label":"Isle of Man","value":"IM","default":""},
  {"label":"Israel","value":"IL","default":""},
  {"label":"Italy","value":"IT","default":""},
  {"label":"Jamaica","value":"JM","default":""},
  {"label":"Japan","value":"JP","default":""},
  {"label":"Jersey","value":"JE","default":""},
  {"label":"Jordan","value":"JO","default":""},
  {"label":"Kazakhstan","value":"KZ","default":""},
  {"label":"Kenya","value":"KE","default":""},
  {"label":"Kiribati","value":"KI","default":""},
  {"label":"Korea, Democratic People's Republic of","value":"KP","default":""},
  {"label":"Korea, Republic of","value":"KR","default":""},
  {"label":"Kuwait","value":"KW","default":""},
  {"label":"Kyrgyzstan","value":"KG","default":""},
  {"label":"Lao People's Democratic Republic","value":"LA","default":""},
  {"label":"Latvia","value":"LV","default":""},
  {"label":"Lebanon","value":"LB","default":""},
  {"label":"Lesotho","value":"LS","default":""},
  {"label":"Liberia","value":"LR","default":""},
  {"label":"Libyan Arab Jamahiriya","value":"LY","default":""},
  {"label":"Liechtenstein","value":"LI","default":""},
  {"label":"Lithuania","value":"LT","default":""},
  {"label":"Luxembourg","value":"LU","default":""},
  {"label":"Macao","value":"MO","default":""},
  {"label":"Macedonia, The Former Yugoslav Republic of","value":"MK","default":""},
  {"label":"Madagascar","value":"MG","default":""},
  {"label":"Malawi","value":"MW","default":""},
  {"label":"Malaysia","value":"MY","default":""},
  {"label":"Maldives","value":"MV","default":""},
  {"label":"Mali","value":"ML","default":""},
  {"label":"Malta","value":"MT","default":""},
  {"label":"Marshall Islands","value":"MH","default":""},
  {"label":"Martinique","value":"MQ","default":""},
  {"label":"Mauritania","value":"MR","default":""},
  {"label":"Mauritius","value":"MU","default":""},
  {"label":"Mayotte","value":"YT","default":""},
  {"label":"Mexico","value":"MX","default":""},
  {"label":"Micronesia, Federated States of","value":"FM","default":""},
  {"label":"Moldova, Republic of","value":"MD","default":""},
  {"label":"Monaco","value":"MC","default":""},
  {"label":"Mongolia","value":"MN","default":""},
  {"label":"Montserrat","value":"MS","default":""},
  {"label":"Morocco","value":"MA","default":""},
  {"label":"Mozambique","value":"MZ","default":""},
  {"label":"Myanmar","value":"MM","default":""},
  {"label":"Namibia","value":"NA","default":""},
  {"label":"Nauru","value":"NR","default":""},
  {"label":"Nepal","value":"NP","default":""},
  {"label":"Netherlands","value":"NL","default":""},
  {"label":"Netherlands Antilles","value":"AN","default":""},
  {"label":"New Caledonia","value":"NC","default":""},
  {"label":"New Zealand","value":"NZ","default":""},
  {"label":"Nicaragua","value":"NI","default":""},
  {"label":"Niger","value":"NE","default":""},
  {"label":"Nigeria","value":"NG","default":""},
  {"label":"Niue","value":"NU","default":""},
  {"label":"Norfolk Island","value":"NF","default":""},
  {"label":"Northern Mariana Islands","value":"MP","default":""},
  {"label":"Norway","value":"NO","default":""},
  {"label":"Oman","value":"OM","default":""},
  {"label":"Pakistan","value":"PK","default":""},
  {"label":"Palau","value":"PW","default":""},
  {"label":"Palestinian Territory, Occupied","value":"PS","default":""},
  {"label":"Panama","value":"PA","default":""},
  {"label":"Papua New Guinea","value":"PG","default":""},
  {"label":"Paraguay","value":"PY","default":""},
  {"label":"Peru","value":"PE","default":""},
  {"label":"Philippines","value":"PH","default":""},
  {"label":"Pitcairn","value":"PN","default":""},
  {"label":"Poland","value":"PL","default":""},
  {"label":"Portugal","value":"PT","default":""},
  {"label":"Puerto Rico","value":"PR","default":""},
  {"label":"Qatar","value":"QA","default":""},
  {"label":"Reunion","value":"RE","default":""},
  {"label":"Romania","value":"RO","default":""},
  {"label":"Russian Federation","value":"RU","default":""},
  {"label":"Rwanda","value":"RW","default":""},
  {"label":"Saint Helena","value":"SH","default":""},
  {"label":"Saint Kitts and Nevis","value":"KN","default":""},
  {"label":"Saint Lucia","value":"LC","default":""},
  {"label":"Saint Pierre and Miquelon","value":"PM","default":""},
  {"label":"Saint Vincent and the Grenadines","value":"VC","default":""},
  {"label":"Samoa","value":"WS","default":""},
  {"label":"San Marino","value":"SM","default":""},
  {"label":"Sao Tome and Principe","value":"ST","default":""},
  {"label":"Saudi Arabia","value":"SA","default":""},
  {"label":"Senegal","value":"SN","default":""},
  {"label":"Serbia and Montenegro","value":"CS","default":""},
  {"label":"Seychelles","value":"SC","default":""},
  {"label":"Sierra Leone","value":"SL","default":""},
  {"label":"Singapore","value":"SG","default":""},
  {"label":"Slovakia","value":"SK","default":""},
  {"label":"Slovenia","value":"SI","default":""},
  {"label":"Solomon Islands","value":"SB","default":""},
  {"label":"Somalia","value":"SO","default":""},
  {"label":"South Africa","value":"ZA","default":""},
  {"label":"South Georgia and the South Sandwich Islands","value":"GS","default":""},
  {"label":"Spain","value":"ES","default":""},
  {"label":"Sri Lanka","value":"LK","default":""},
  {"label":"Sudan","value":"SD","default":""},
  {"label":"Suriname","value":"SR","default":""},
  {"label":"Svalbard and Jan Mayen","value":"SJ","default":""},
  {"label":"Swaziland","value":"SZ","default":""},
  {"label":"Sweden","value":"SE","default":""},
  {"label":"Switzerland","value":"CH","default":""},
  {"label":"Syrian Arab Republic","value":"SY","default":""},
  {"label":"Taiwan, Province of China","value":"TW","default":""},
  {"label":"Tajikistan","value":"TJ","default":""},
  {"label":"Tanzania, United Republic of","value":"TZ","default":""},
  {"label":"Thailand","value":"TH","default":""},
  {"label":"Timor-Leste","value":"TL","default":""},
  {"label":"Togo","value":"TG","default":""},
  {"label":"Tokelau","value":"TK","default":""},
  {"label":"Tonga","value":"TO","default":""},
  {"label":"Trinidad and Tobago","value":"TT","default":""},
  {"label":"Tunisia","value":"TN","default":""},
  {"label":"Turkey","value":"TR","default":""},
  {"label":"Turkmenistan","value":"TM","default":""},
  {"label":"Turks and Caicos Islands","value":"TC","default":""},
  {"label":"Tuvalu","value":"TV","default":""},
  {"label":"Uganda","value":"UG","default":""},
  {"label":"Ukraine","value":"UA","default":""},
  {"label":"United Arab Emirates","value":"AE","default":""},
  {"label":"United Kingdom","value":"GB","default":""},
  {"label":"United States","value":"US","default":""},
  {"label":"United States Minor Outlying Islands","value":"UM","default":""},
  {"label":"Uruguay","value":"UY","default":""},
  {"label":"Uzbekistan","value":"UZ","default":""},
  {"label":"Vanuatu","value":"VU","default":""},
  {"label":"Venezuela","value":"VE","default":""},
  {"label":"Viet Nam","value":"VN","default":""},
  {"label":"Virgin Islands, British","value":"VG","default":""},
  {"label":"Virgin Islands, U.S.","value":"VI","default":""},
  {"label":"Wallis and Futuna","value":"WF","default":""},
  {"label":"Western Sahara","value":"EH","default":""},
  {"label":"Yemen","value":"YE","default":""},
  {"label":"Zambia","value":"ZM","default":""},
  {"label":"Zimbabwe","value":"ZW","default":""}
  ]}
  
  ```
  
  > **Comments:**
  > **username_4**: This is just what I was looking for :) thanks, ps working without removing line brakes  
  > **username_3**: Glad it worked @username_4. And thanks for the follow up on line breaks.  
  > **username_5**: Ha, one of those times when you think 'It's a longshot but I'll just Google this before subjecting myself to this tedium...' So glad I did...  
  
  ---
  
  ### Answer by username_6 on 2015-07-09. Score: 4
  
  This doesn't really address the problem either, but for anyone looking for "States" data (to replicate what username_3 did), here it is:
  
  ```
  {"options":[{"label":"Alabama","value":"AL","default":""},{"label":"Alaska","value":"AK","default":""},{"label":"Arizona","value":"AZ","default":""},{"label":"Arkansas","value":"AR","default":""},{"label":"California","value":"CA","default":""},{"label":"Colorado","value":"CO","default":""},{"label":"Connecticut","value":"CT","default":""},{"label":"Delaware","value":"DE","default":""},{"label":"District of Columbia","value":"DC","default":""},{"label":"Florida","value":"FL","default":""},{"label":"Georgia","value":"GA","default":""},{"label":"Hawaii","value":"HI","default":""},{"label":"Idaho","value":"ID","default":""},{"label":"Illinois","value":"IL","default":""},{"label":"Indiana","value":"IN","default":""},{"label":"Iowa","value":"IA","default":""},{"label":"Kansas","value":"KS","default":""},{"label":"Kentucky","value":"KY","default":""},{"label":"Louisiana","value":"LA","default":""},{"label":"Maine","value":"ME","default":""},{"label":"Maryland","value":"MD","default":""},{"label":"Massachusetts","value":"MA","default":""},{"label":"Michigan","value":"MI","default":""},{"label":"Minnesota","value":"MN","default":""},{"label":"Mississippi","value":"MS","default":""},{"label":"Missouri","value":"MO","default":""},{"label":"Montana","value":"MT","default":""},{"label":"Nebraska","value":"NE","default":""},{"label":"Nevada","value":"NV","default":""},{"label":"New Hampshire","value":"NH","default":""},{"label":"New Jersey","value":"NJ","default":""},{"label":"New Mexico","value":"NM","default":""},{"label":"New York","value":"NY","default":""},{"label":"North Carolina","value":"NC","default":""},{"label":"North Dakota","value":"ND","default":""},{"label":"Ohio","value":"OH","default":""},{"label":"Oklahoma","value":"OK","default":""},{"label":"Oregon","value":"OR","default":""},{"label":"Pennsylvania","value":"PA","default":""},{"label":"Rhode Island","value":"RI","default":""},{"label":"South Carolina","value":"SC","default":""},{"label":"South Dakota","value":"SD","default":""},{"label":"Tennessee","value":"TN","default":""},{"label":"Texas","value":"TX","default":""},{"label":"Utah","value":"UT","default":""},{"label":"Vermont","value":"VT","default":""},{"label":"Virginia","value":"VA","default":""},{"label":"Washington","value":"WA","default":""},{"label":"West Virginia","value":"WV","default":""},{"label":"Wisconsin","value":"WI","default":""},{"label":"Wyoming","value":"WY","default":""}]}
  
  ```
  
  1. Create a dropdown field.
  2. Navigate to the `craft_fields` table
  3. Locate the row with your `states` handle
  4. Add the data to the `settings` column
  5. Output states in a dropdown
  
     ```
     {% for state in craft.fields.getFieldByHandle('states').getFieldType.options %}
         <option value="{{ state.value }}">{{ state.label }}</option>
     {% endfor %}
  
     ```
  
  Even better, create a reusable macro:
  
  ```
  
  {% macro stateDropdownOptions(currentState) %}
      <option>Select One</option>
      {% for state in craft.fields.getFieldByHandle('states').getFieldType.options %}
          <option value="{{ state.value }}"{{ currentState is defined and state.value == currentState ? ' selected' : '' }}>
              {{ state.label }}
          </option>
      {% endfor %}
  {% endmacro %}
  
  ```
  
  and use it:
  
  ```
  
  {% import 'macros/form' as formMacros %}
  
  ...
  
  <select name="states">
      {{ formMacros.stateDropdownOptions(row.state) }}
  </select>
  
  ```
  
  
  ---
  
  ### Answer by username_7 on 2014-12-10. Score: 4
  
  Unfortunately the drop down options in [Territories Dropdown Plugin](http://straightupcraft.com/craft-plugins/territories-fieldtype) are not automatically available in templates.
  It need to be accessed through a field on an element. You're currently trying to access it through 'entry' which i assume doesn't exist in your template (as you would have copied this part).
  
  eg. I'm using it on projects in my template:
  
  ```
  {% for option in project.country.options %}
  <option {% if option.selected %}selected="selected"{% endif %} value="{{ option }}">{{ option.label }}</option>
  {% endfor %}
  
  ```
  
  For me 'project' is an [entry in my section](http://buildwithcraft.com/docs/fields) 'projects' which has been declared above and i have [given it the field](http://buildwithcraft.com/docs/fields) 'country' of type 'Territories - Dropdown' in the admin panel.
  
  ---
  
  If you want to access the options with out an instance of an entry you'll still need to [create a field](http://buildwithcraft.com/docs/fields) with the type 'Territories - Dropdown'. Then replace 'country' in the code below with the handle you give your field.
  
  ```
  {% for option in craft.fields.getFieldByHandle('country').getFieldType.options %}
  <option value="{{ option }}">{{ option.label }}</option>
  {% endfor %}
  
  ```
  
  > **Comments:**
  > **username_8**: Many thanks username_7 for the example. I found that outputting {{ option }} caused an array to string conversion error and I needed to use {{ option.value }} instead of just {{ option }} to get this working.  
  
  ---
  
  