Many Drupal forms contain a submit button with id="edit-submit" when you don't supply one yourself, as does the Switch Theme module.

Could you please make the following change to the switchtheme.module file:

OLD Line 126:
$form['submit'] = array( '#type' => 'submit', '#value' => t('Switch'));

NEW Line 126:
$form['submit'] = array('#id'=>'switchtheme-submit', '#type' => 'submit', '#value' => t('Switch'));

This change assists when trying to make a valid XHTML 1.0 site in Drupal as ID attributes should be unique throughout a page.

Thanks for the module, it works great.

PS: In this post, I added the php tags to each line to make the markup easier to read, they obviously aren't needed in the module file.

Comments

karens’s picture

Status: Active » Fixed

Good idea. Done.

Anonymous’s picture

Status: Fixed » Closed (fixed)