You are here

function weather_search_form_submit in Weather 6.5

Same name and namespace in other branches
  1. 7.3 weather.forms.inc \weather_search_form_submit()
  2. 7 weather.forms.inc \weather_search_form_submit()
  3. 7.2 weather.forms.inc \weather_search_form_submit()

Submission handler for the weather search form.

Just redirect the user to the weather URL with the search term stuffed on the end of it. We've been through validation but make sure the search contains no dodgy characters here.

File

./weather.module, line 1188
Display <acronym title="METeorological Aerodrome Report">METAR</acronym> weather data from anywhere in the world

Code

function weather_search_form_submit($form, &$form_state) {
  drupal_goto('weather/' . urlencode($form_state['values']['search']));
}