function asset_search_wizard_form in Asset 6
Same name and namespace in other branches
- 5.2 contrib/asset_search/asset_search.module \asset_search_wizard_form()
Asset Search Form
1 string reference to 'asset_search_wizard_form'
- asset_search_wizard in contrib/
asset_search/ asset_search.module - Callback for asset/wizard/method/search
File
- contrib/
asset_search/ asset_search.module, line 63
Code
function asset_search_wizard_form() {
$options = array();
foreach (asset_search_types() as $key => $type) {
if ($type['group']) {
$options[$type['group']][$key] = $type['name'];
}
else {
$options[$key] = $type['name'];
}
}
$form['search_type'] = array(
'#type' => 'select',
'#title' => t('Search Type'),
'#options' => $options,
'#default_value' => 'rss',
'#required' => TRUE,
);
$form['search_value'] = array(
'#type' => 'textfield',
'#title' => t('Search Value'),
'#required' => TRUE,
);
$results = asset_search_wizard_recent_searches();
$form[] = array(
'#type' => 'item',
'#title' => t('Recent searches'),
'#value' => theme('item_list', $results),
);
$form['buttons'] = array(
'#tree' => FALSE,
'#theme' => 'asset_wizard_form_buttons',
);
$form['buttons'][] = array(
'#type' => 'submit',
'#value' => t('Search'),
);
return $form;
}