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

Issue Type: Bug Created: 2010-02-04T11:44:10.000+0000 Last Updated: 2012-06-08T16:54:45.000+0000 Status: Closed Fix version(s): Reporter: Hive (hive) Assignee: Frank Brückner (frosch) Tags: - Zend_Form

Related issues: - ZF-9334



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:

myform; ?> "> umlaut["street"]); ?> Sample data for the Users-Model is INSERT INTO `users` (`userid`, `username`, `email`, `street`, `housenumber`) VALUES ('11', 'Test', '', '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

Have you found an issue?

See the Overview section for more details.


© 2006-2016 by Zend, a Rogue Wave Company. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.