views:

64

answers:

1
    $button = new Zend_Form_Element_Submit('melnraksts');
    $button->setAttrib('id','melnraksts');
    $button->setValue(Lang::$form[17]);
    $button->setDecorators(array('Composite')); 
    $button->removeDecorator('Errors');     
    $form->addElement($button);

    $submit = new Zend_Form_Element_Submit('submit');
    $submit->setAttrib('id','submit');
    $submit->setValue(Lang::$form['1']);
    $submit->setDecorators(array('Composite')); 
    $submit->removeDecorator('Errors');     
    $form->addElement($submit);

alt text

Don't know why one of the submit buttons value dissapear after validation triggers.

Left button is disabled via javascript, by returning false.

So why does it's value dissapear? O_o

Maybe because they both have submit type? Maybe there is another way to make submit type button?

A: 

You should use $submit->setLabel('My label')

takeshin