It did show "Login" on the button(I used ZF1.5.0pr), but after I read 
Matthiew's email(the one next to mine), I realized it is not good.
   
  Jason.

Dennis Becker <[EMAIL PROTECTED]> wrote:
  That does not work, as Matthiew also said in his answer. The only way works 
is to set not the decorators for all elements ats one (elementDecorators), you 
have to add your own decorator for each element without the 'submit' button. So 
the code expands a lot! For 5 Elements + 1 Sumbit form, you have to declare the 
decorator 5 times instead of 1 time. The 'elementDecorators' overwrite the 
spcific decorator of an element. Maybe you can change that Matthiew, like the 
behaviour of CSS, the nearest decorator definition get's chosen?



Regards
Dennis


  2008/2/19, Jason Qi <[EMAIL PROTECTED]>:  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.  




       
---------------------------------
Never miss a thing.   Make Yahoo your homepage.

Reply via email to