I have an OpenAtrium distribution installed on Drupal 6. As you may already know OpenAtrium already implements a search feature. What I'd like to do is change the following form:

enter image description here

by adding another button alongside the Search one (there are other modifications that I'd like to do but it doesn't matter this is just the final goal).

The problem is that I don't know what is the PHP page that builds that form. All I know is that page.header.inc prints the content of that form:

 <div id='space-tools'><div class='dropdown-blocks toggle-blocks clear-block'><?php print $space_tools ?></div></div>

As you can imagine $space_tools contains the entire menu and also the form. But who's the one who builds the $space_tools variable? Is there an OpenAtrium API that I can read somewhere?

This is the result HTML which I'd like to change:

<div id="space-tools"><div class="dropdown-blocks toggle-blocks clear-block processed">  
<form action="/openatrium/XXXXXX/" accept-charset="UTF-8" method="post" id="atrium-search-form">
    <div class="form-item form-item-labeled" id="edit-search-wrapper">
        <label for="edit-search">Search XXXXXXX: <span class="form-required" title="This field is required.">*</span></label>
        <input type="text" maxlength="128" name="search" id="edit-search" value="" class="form-text required fluid">
    <input type="submit" name="op" id="edit-submit" value="Search" class="form-submit">
    <input type="hidden" name="form_build_id" id="form-31ea0a19166f0619050f7ac923ebf331" value="form-31ea0a19166f0619050f7ac923ebf331">
    <input type="hidden" name="form_token" id="edit-atrium-search-form-form-token" value="aaf2e5374720acee5769fcafb6421e35">
    <input type="hidden" name="form_id" id="edit-atrium-search-form" value="atrium_search_form">

Thank you. Almost forgot, here where I work imgur is blocked by the proxy so I can't tell if the image has been uploaded or not.

EDIT: This is driving me crazy I looked up over the entire OpenAtrium folder for the word "atrium-search-form" and no result at all inside files. How can this even be possible lol? Unless the ID is built upon different variables, in that case I don't know what to do...

  • 1
    The image uploaded fine by the way
    – Clive
    Jan 8, 2013 at 13:35

1 Answer 1


It's displayed using the Context module. I found it like this:

  • Go to admin/build/context and select the global context
    • Click the Blocks reaction
    • Under the Space tools region, Atrium: Search form block is being shown

I then searched for the name Atrium: Search form, and found that the block is defined in the atrium_features module, in functions atrium_block and atrium_search_form of file atrium/atrium.module.

You could modify the search form using a hook_form_FORM_ID_alter hook, such as hook_form_atrium_search_form_alter.

  • There was an issue on the Open Atrium community that pointed me to that direction as well. Thank you!
    – raz3r
    Jan 8, 2013 at 14:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.