function search_api_page_search_box_content_type_edit_form in Search API Pages 7
Returns an edit form for custom type settings.
See also
search_api_page_search_box_content_type_edit_form_submit()
1 string reference to 'search_api_page_search_box_content_type_edit_form'
- search_api_page_search_box.inc in plugins/
content_types/ search_api_page_search_box.inc
File
- plugins/
content_types/ search_api_page_search_box.inc, line 50
Code
function search_api_page_search_box_content_type_edit_form($form, &$form_state) {
$conf = $form_state['conf'];
$pages = array();
foreach (search_api_page_load_multiple(FALSE, array(
'enabled' => TRUE,
)) as $page => $info) {
$pages[$info->machine_name] = $info->name;
}
$form['page'] = array(
'#type' => 'select',
'#title' => t('Search API Page'),
'#options' => $pages,
'#default_value' => $conf['page'],
'#required' => TRUE,
);
$form['keys'] = array(
'#type' => 'textfield',
'#default_value' => $conf['keys'],
'#title' => t('Keys'),
'#description' => t('Add keys to search box form. Keywords from contexts are allowed.'),
);
return $form;
}