Closed (fixed)
Project:
Location
Version:
6.x-3.1-rc1
Component:
Documentation
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
16 Feb 2010 at 08:41 UTC
Updated:
24 Nov 2012 at 06:30 UTC
Jump to comment: Most recent file
Comments
Comment #1
rooby commentedUse hook_form_alter(&$form, &$form_state, $form_id)
For an example see the location_search modules location_search_form_alter(), which is where the advanced form is added to the search form.
You could do things like:
Comment #3
dianacastillo commentedi put this in my template.php in my theme
function search_form_alter(&$form, &$form_state, $form_id) {
if ($form_id == 'search_form' ) {
if (isset($form['advanced'])) {
// Uncollapse fieldset by default.
$form['advanced']['#collapsed'] = FALSE;
// Move the fieldset to the top.
$form['advanced']['#weight'] = -10;
}
}
}
and it doesnt change anything, the advanced search is still collapsed. I put the them name instead of search that doesn work either
Is there somewhere else I'm supposed to put it?
thank you
Comment #4
rooby commentedThe hook_form_alter function should go into a custom module.
For example, you create a module called my_search_customisations (you can call it something better I'm sure).
Then in that module you have
If you are unfamiliar with creating modules there is mush info on it at http://drupal.org/node/206753
Comment #5
dianacastillo commentedokay, i made a module which does this, I am attaching it. how can I publish this so other people can use it?
Comment #6
rooby commentedIf you go to your account profile page there is a tab called "Your projects".
If you go there there will be a list of your existing projects and a link to add one.
You can add a sandbox project there.
Then you can refer people to that sandbox.
If you want to can also promote it to a full project. To do this you first have to have it approved by posting a project application issue at http://drupal.org/project/projectapplications
There is more detailed information at http://drupal.org/node/1011196 and its sub-pages.