NOTE: update... so I found something about having multiple forms on a page whereby the id's get changed. So instead of starting a new thread...unless I should....how can I find the actual "action" the form takes? I see "/inventory" on one of them and the other is a bunch of numbers.... my purpose is that I may have just to hard code some html search boxes, theme them and add the actions myself but as there isn't a php file they are being sent to, I can't track down in Drupal what to put in the Action attribute?

I'm theming a site and there are two forms on the current site, a fuzzy-search and the regular theme-search-box.

I have a pre-process in my template.php that renders the site's search form and then I style that with the appropriate css.

For the fuzzy search form, which originally is in a block, I put that in the header region in the admin/blocks and with css have styled and positioned that. So no preprocess, it just gets included with the $header variable that is printed in both my templates and I style it with css.

I have a page-front.tpl.php and a page.tpl.php file. The forms are styled and appear where they should throughout the site except when I run a search with either of them. When results are returned using either search form, the css for the submit button gets changed.. I lose my submit button css... it's a magnifying glass icon inside the search box but changes to an actual button but with the width I've specified in my css. So the text-input box stays the same, but the submit button is changed due to a new id getting applied somewhere.

If I navigate away from the results, all gets reset ok. So I'm trying to find out where the new css is coming from.

With Firebug, I see that the submit button itself gets a new id of "edit-submit-3". It is "edit-submit-1" until it is pressed.

I did not build this site and it's my first foray into Drupal, now going on 2 months strong, so maybe there is something I'm missing? Where and how does Drupal apply the new id to only the submit button?

The preprocess I'm using, if it matters is:

/* a custom preprocessing function for form. If needed. Change the "#title" to whatever.*/
function sharpTwentyThirteen_preprocess_search_theme_form(&$vars, $hook) {

  // Modify elements of the search form
  $vars['form']['search_theme_form']['#title'] = t('');
 
  // Set a default value for the search box
  $vars['form']['search_theme_form']['#value'] = t('Search our site');
  
  // Change the size of the search box
  $vars['form']['search_theme_form']['#size'] = 17;

  // Change the text on the submit button
  $vars['form']['submit']['#value'] = t('');

  // Rebuild the rendered version (search form only, rest remains unchanged)
  unset($vars['form']['search_theme_form']['#printed']);
  $vars['search']['search_theme_form'] = drupal_render($vars['form']['search_theme_form']);

  // Rebuild the rendered version (submit button, rest remains unchanged)
  unset($vars['form']['submit']['#printed']);
  $vars['search']['submit'] = drupal_render($vars['form']['submit']);

  // Collect all form elements to make it easier to print the whole form.
  $vars['search_form'] = implode($vars['search']);
}
nobody click here