I used below two lines of code, and the button shows "Login"
$this->view->form = new Zend_Form(...)
$this->view->form->submit->setValue('Login');
Do I answer your question ?
Jason.
Dennis Becker <[EMAIL PROTECTED]> wrote: But what if I don't want to use
'label' at the submit button? I only want to use 'value'.
2008/2/19, Matthew Weier O'Phinney <[EMAIL PROTECTED]>:
-- Dennis Becker <[EMAIL PROTECTED]> wrote
(on Tuesday, 19 February 2008, 01:54 PM +0100):
> I have created a small form for testing the new Zend_Form component. Can
> anyone
> tell me, why I cannot set the "value" property for a 'submit' button? Instead,
> the 'submit' button uses the value for 'label' and I cannot deactive the label
> for 'submit'. For me it looks like a bug, but I'm not sure.
This is by design.
We use the label of the element, as this is what is *displayed* to the
end user. It also allows us to check the submitted value against the
label to determine (a) if the given submit button was used, and/or (b)
if somebody's potentially monkeying with the form. As an example,
Zend_Form_Element_Submit::isChecked() checks the submitted value
against the label, for instance; if they match, isChecked() returns
true.
--
Matthew Weier O'Phinney
PHP Developer | [EMAIL PROTECTED]
Zend - The PHP Company | http://www.zend.com/
---------------------------------
Looking for last minute shopping deals? Find them fast with Yahoo! Search.