ZF2-358: Select elements won't be selected when isValid() fails

Issue Type: Bug Created: 2012-06-13T14:32:00.000+0000 Last Updated: 2012-08-07T18:05:55.000+0000 Status: Closed Fix version(s): Reporter: Tõnis Tobre (tobre) Assignee: Chris Martin (cgmartin) Tags: - Zend\Form

Related issues: Attachments:


How to reproduce:

In form class:

<pre class="highlight">
$periodId = new Element('periodId');
$periodId->setAttributes(array (
    'type' => 'select', 
    'id' => 'periodId', 
    'options' => $this->getPeriodOptions()

In view script:

<pre class="highlight">
echo $this->formSelect($this->form->get('periodId'));


Posted by Chris Martin (cgmartin) on 2012-07-04T21:37:22.000+0000

Was unable to reproduce using commit f8e8120f11089c2a29027fd2b26002f666eb8110 Date: Wed Jul 4 05:34:43 2012 -0700

I had set up a form with a select input and text input, both required. I triggered a "false" isValid() by not filling in the required text input, but having an option selected in the select element. The previously selected element was still selected after the form's isValid() was false.…

Please give some additional repro steps if this is still an issue for you, Tõnis.

Posted by Chris Martin (cgmartin) on 2012-08-07T18:05:55.000+0000

Unable to reproduce in latest trunk. Closing issue.

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.