function getlocations_blocks_province_form in Get Locations 7
Same name and namespace in other branches
- 7.2 modules/getlocations_blocks/getlocations_blocks.module \getlocations_blocks_province_form()
Parameters
array $form:
array $form_state:
Return value
array the form
1 string reference to 'getlocations_blocks_province_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 596 - getlocations_blocks.module @author Bob Hutchinson http://drupal.org/user/52366 @copyright GNU GPL
Code
function getlocations_blocks_province_form($form, &$form_state) {
$settings = getlocations_blocks_get_var();
if ($settings['province_element'] == 'dropdown') {
$options = getlocations_blocks_province_get();
$form['getlocations_blocks_province'] = array(
'#type' => 'select',
'#title' => t('Province'),
'#options' => $options,
);
}
else {
$form['getlocations_blocks_province'] = array(
'#type' => 'textfield',
'#title' => t('Province'),
'#maxlength' => 255,
'#size' => 20,
'#autocomplete_path' => 'getlocations_blocks/province_autocomplete',
);
}
$form['getlocations_blocks_province_form_submit'] = array(
'#type' => 'submit',
'#value' => t('Go'),
);
$form += getlocations_blocks_get_attached_elements();
return $form;
}