function document_block2_form in Document 6
Same name and namespace in other branches
- 7 document.module \document_block2_form()
- 8.x document.module \document_block2_form()
1 string reference to 'document_block2_form'
- document_block in ./
document.module - Implementation of hook_block().
File
- ./
document.module, line 515
Code
function document_block2_form() {
$form = array();
$action = url('document');
$form['document_block2_label'] = array(
'#type' => 'item',
'#value' => t('Search for a document'),
'#prefix' => '<div class="document-block-label">',
'#suffix' => '</div>',
);
$form['document_block2_input'] = array(
'#type' => 'textfield',
'#attributes' => array(
'class' => 'document-block-input',
),
);
$form['document_block2_submit'] = array(
'#type' => 'image_button',
'#src' => document_image_url('doc-search.png'),
'#attributes' => array(
'class' => 'document-block-submit',
),
);
$types = document_get_types(FALSE);
$types[''] = '--Select Type--';
$form['document_block2_doctype'] = array(
'#type' => 'select',
'#options' => $types,
'#required' => TRUE,
'#attributes' => array(
'class' => 'document-block-doctype',
),
);
$form['document_block2_advanced'] = array(
'#type' => 'markup',
'#value' => "<div class='document-block-advanced'><a href='{$action}'>" . t('Advanced Search') . "</a></div>",
);
$form['#method'] = 'get';
$form['#action'] = $action;
return $form;
}