function getlocations_blocks_country_form in Get Locations 7
Same name and namespace in other branches
- 7.2 modules/getlocations_blocks/getlocations_blocks.module \getlocations_blocks_country_form()
Parameters
array $form:
array $form_state:
Return value
array the form
1 string reference to 'getlocations_blocks_country_form'
- getlocations_blocks_contents in modules/
getlocations_blocks/ getlocations_blocks.module - A module-defined block content function.
File
- modules/
getlocations_blocks/ getlocations_blocks.module, line 666 - getlocations_blocks.module @author Bob Hutchinson http://drupal.org/user/52366 @copyright GNU GPL
Code
function getlocations_blocks_country_form($form, &$form_state) {
$settings = getlocations_blocks_get_var();
if ($settings['country_element'] == 'dropdown') {
$options = getlocations_blocks_country_get();
$form['getlocations_blocks_country'] = array(
'#type' => 'select',
'#title' => t('Country'),
'#options' => $options,
);
}
else {
$form['getlocations_blocks_country'] = array(
'#type' => 'textfield',
'#title' => t('Country'),
'#maxlength' => 255,
'#size' => 20,
'#autocomplete_path' => 'getlocations_blocks/country_autocomplete',
);
}
$form['getlocations_blocks_country_form_submit'] = array(
'#type' => 'submit',
'#value' => t('Go'),
);
$form += getlocations_blocks_get_attached_elements();
return $form;
}