Joah.: PEAR HTML_QuickForm <> CSS für die Elemente?

Beitrag lesen

Hallo,

ich habe mit PEAR Quick_Form ein einfaches HTML Login Formular aufgebaut. Nun möchte ich die einzelnen Felder des Formulars über vordefinierte CSS-Klassen z.b. email formatieren.

Hat jemand eine Ahnung, wie das funktioniert?
Über die PEAR Seite konnte ich bisher nichts finden :(

Gruß
Joah.

Source:

$form1 = new HTML_QuickForm($formName = 'loginForm', $method = 'POST', $action = '', $target = '_self', $attributes = '', $trackSubmit = true);
$form1->addElement('header', 'hdrSuchen', 'Login Formular');

$form1->addElement('text', 'email', 'Email');
$form1->addElement('password', 'passwort', 'Passwort');

// funkioniert so an dieser Stelle nicht :(
$email = &$form1->getElement('email');
$email->setAttributes(array(" class='email'"));

$form1->addElement('submit', 'btnSubmit', 'Submit');