Issues

ZF-7457: Dojo ComboBox default value does not appear when no options are added

Issue Type: Bug Created: 2009-08-03T11:03:39.000+0000 Last Updated: 2012-11-20T20:52:40.000+0000 Status: Closed Fix version(s): Reporter: Marc Peterson (marcpeterson) Assignee: None Tags: - Zend_Dojo

Related issues: Attachments:

Description

The value of a ComboBox is lost if it does not have any options added. A ComboBox is rendered as a select form element, and the decorator removes the value attribute. This is fine when there are options and an option matches the value. But in a ComboBox with no options the value should be preserved in the input tag. This is important to keep because the ComboBox's options may be filled later with a datastore.

The following should make a ComboBox with "test" as its value.

<pre class="highlight">
$form = new Zend_Dojo_Form();
$combo = $form->createElement('ComboBox', 'combo');
$combo->setValue('Test');
$form->addElement($combo);

Comments

Posted by Rob Allen (rob) on 2012-11-20T20:52:40.000+0000

Bulk change of all issues last updated before 1st January 2010 as "Won't Fix".

Feel free to re-open and provide a patch if you want to fix this issue.

Have you found an issue?

See the Overview section for more details.

Copyright

© 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.

Contacts