Provides various helper functions when working with address in forms.
| Address Helper | Provides various helper functions when working with address in forms. |
| Functions | |
| state_select() | Creates a state/provience/county dropdown form input based on the entries in the address.states config. |
| country_select() | Creates a country-based dropdown form input based on the entries in the address.countries config. |
if ( !function_exists('state_select') )
Creates a state/provience/county dropdown form input based on the entries in the address.states config. The word “state” is used but the structure can be used for Canadian proviences, Irish and UK counties and any other area based data.
| $selected_code | The value of the item that should be selected when the dropdown is drawn. |
| $default_abbr | The value of the item that should be selected if no other matches are found. |
| $country_code | The code of the country for which the states/priviences/counties are returned. Defaults to ‘US’. |
| $select_name | The name assigned to the select. Defaults to ‘state_code’. |
A string with the full html for the select input.
if ( !function_exists('country_select') )
Creates a country-based dropdown form input based on the entries in the address.countries config.
| $selected_iso | The value of the item that should be selected when the dropdown is drawn. |
| $default_iso | The value of the item that should be selected if no other matches are found. |
| $select_name | The name assigned to the select. Defaults to ‘iso’. |
A string with the full html for the select input.
Creates a state/provience/county dropdown form input based on the entries in the address.states config.
if ( !function_exists('state_select') )
Creates a country-based dropdown form input based on the entries in the address.countries config.
if ( !function_exists('country_select') )