function weather_search_form in Weather 6.5
Same name and namespace in other branches
- 7.3 weather.forms.inc \weather_search_form()
- 7 weather.forms.inc \weather_search_form()
- 7.2 weather.forms.inc \weather_search_form()
Display a form for the user to search for weather locations.
1 string reference to 'weather_search_form'
- weather_search_location in ./
weather.module - Searches for the specified location, whether it is a place name or an ICAO code. For example, weather/fuhlsbüttel will display the weather for Hamburg-Fuhlsbüttel.
File
- ./
weather.module, line 1152 - Display <acronym title="METeorological Aerodrome Report">METAR</acronym> weather data from anywhere in the world
Code
function weather_search_form() {
$form = array();
$form['search'] = array(
'#type' => 'textfield',
'#title' => t('Search for a location'),
'#description' => t('Type in an ICAO code, a name, or a country to search for weather conditions at that location.'),
'#autocomplete_path' => 'weather/autocomplete',
);
$form['submit'] = array(
'#type' => 'submit',
'#value' => t('Search'),
);
return $form;
}