ZF-9086: $form->populate leaving textinput with german umlauts empty


After querying a row from database and populating the data into a Zend_Form, inputfields containing values with german umlauts are empty

This is the form class:

class UserForm extends Zend_Form { function init() { $this->setMethod('post'); $txt_username = new Zend_Form_Element_Text('username',array('label' => 'Benutzername')); $txt_username->addValidator('alnum') ->addValidator('stringLength',false,array(3,20)) ->addFilter('StringTrim'); $txt_email = new Zend_Form_Element_Text('email',array('label' => 'E-Mail')); $txt_housenumber = new Zend_Form_Element_Text('housenumber', array('label' => 'Hausnummer')); $txt_email->addValidator('EmailAddress');

        $txt_street = new Zend_Form_Element_Text('street',array('label' => 'Strasse'));
        $sbmt_submit = new Zend_Form_Element_Submit('submit',array('label' => 'Abschicken'));

This is the action:

public function editAction() {
    $id = (int) $this->getRequest()->getParam('id');
    $user = new Users();
    $myForm = new UserForm();
    $formuser = $user->find($id)->current()->toArray();
    $this->view->myform = $myForm->render();
    $this->view->umlaut = $formuser;

And this is my sample view:

<?= $this->myform; ?> "> <? Zend_Debug::dump($this->umlaut["street"]); ?>

Sample data for the Users-Model is INSERT INTO users (userid, username, email, street, housenumber) VALUES ('11', 'Test', 'test@test.de', 'Bölschestraße', '5');

So in the Zend_Debug::dump and into the written manually to the form the values are correct, but the rendered street-input populated by Zend_Form is empty


No comments to display