Skip to content
Snippets Groups Projects
Commit e9464525 authored by Angie Byron's avatar Angie Byron
Browse files

#1008022 by droplet, jhodgdon, aspilicious: Fixed search-block-form.tpl.php...

#1008022 by droplet, jhodgdon, aspilicious: Fixed search-block-form.tpl.php refers to ['submit'], which no longer exists
parent 06bb1d9b
No related branches found
No related tags found
2 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
......@@ -3,32 +3,29 @@
/**
* @file
* Default theme implementation for displaying a search form within a block
* region.
* Displays the search form block.
*
* Available variables:
* - $search_form: The complete search form ready for print.
* - $search: Array of keyed search elements. Can be used to print each form
* element separately.
* - $search: Associative array of search elements. Can be used to print each
* form element separately.
*
* Default keys within $search:
* Default elements within $search:
* - $search['search_block_form']: Text input area wrapped in a div.
* - $search['submit']: Form submit button.
* - $search['hidden']: Hidden form elements. Used to validate forms when submitted.
*
* Since $search is keyed, a direct print of the form element is possible.
* Modules can add to the search form so it is recommended to check for their
* existence before printing. The default keys will always exist.
* - $search['actions']: Rendered form buttons.
* - $search['hidden']: Hidden form elements. Used to validate forms when
* submitted.
*
* Modules can add to the search form, so it is recommended to check for their
* existence before printing. The default keys will always exist. To check for
* a module-provided field, use code like this:
* @code
* <?php if (isset($search['extra_field'])): ?>
* <div class="extra-field">
* <?php print $search['extra_field']; ?>
* </div>
* <?php endif; ?>
*
* To check for all available data within $search, use the code below.
*
* <?php print '<pre>'. check_plain(print_r($search, 1)) .'</pre>'; ?>
* @endcode
*
* @see template_preprocess_search_block_form()
*/
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment