ZF-8475: Dojo form button can't submit a value

Issue Type: Bug Created: 2009-12-04T14:21:08.000+0000 Last Updated: 2009-12-05T07:06:11.000+0000 Status: Resolved Fix version(s): Reporter: boris (jer) Assignee: Matthew Weier O'Phinney (matthew) Tags: - Zend_Dojo

Related issues: - ZF-5056



this bug is related to this one But for Zend_Form there is a workaround - just to use Zend_Form_Element_Submit instead of Zend_Form_Element_Button, for Zend_Dojo_Form_Element_Button there is no alternative

<pre class="highlight">
$form = new Zend_Dojo_Form()
$button = new Zend_Dojo_Form_Button(
        'label'     => 'Save',
        'id'        => 'id',
        'type'      => 'Submit',
        'value'     => 'Save',


isChecked() will never return true (tested FF, IE8, Chrome, Safari, Opera), because value attribute of button is always empty due to the way Zend_Form_Decorator_ViewHelper works (it just never gives button a value attribute!)


Posted by Matthew Weier O'Phinney (matthew) on 2009-12-05T07:05:47.000+0000

Use Zend_Dojo_Form_SubmitButton if you need a submittable dijit.form.Button, or provide an onclick callback that submits the button: ``` $button = new Zend_Dojo_Form_Button( 'Save', array(
'label' => 'Save', 'id' => 'id', 'type' => 'Submit', 'value' => 'Save', 'onclick' => 'dijit.byId("formid").submit()', ) ); {note}

Have you found an issue?

See the Overview section for more details.


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

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