Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
In my theme, I needed to move the submit button down by about 20px using margin-top. To do this, I added an '#id' value to the submit array in apachesolr_search.pages.inc:
function apachesolr_search_custom_page_search_form($form, &$form_state, $search_page, $keys = '') {
. . .
$form['basic']['submit'] = array(
'#type' => 'submit',
'#id' => 'solr',
'#value' => t('Search'),
);
This allowed me to define the CSS for this button by calling input#solr
in my themes stylesheets.
Not sure if we would want to add this permanently, but at least it might be helpful for someone else in the future.
Regards,
James
Comments
Comment #1
Nick_vhPlease alter this in a hook_form_alter. This is something that doesn't require a lot of coding. Unless the consensus of many others would be to add an id here, I prefer not to touch it. I assume many others have done this in a hook_form_alter already.
Comment #2
orange-wedge CreditAttribution: orange-wedge commentedThank you for suggesting hook_form_alter(). I prefer that approach too. I wasn't aware of that hook. Sorry to add a non-issue.
This hook worked: