2008年11月13日星期四

Re: [fw-mvc] Setting form elements properties on the fly

Hi,
it should look something like this:
$form->getElement('SuperUser')->setValue(1);
--
Aurelijus Valeiša
http://www.Aurelijus.eu


On Thu, Nov 13, 2008 at 11:33 AM, John Antony Riga <ja.riga@yahoo.com> wrote:
Hello list,

I'm trying to modify some form elements before showing the form ; is it possible to do this with Zend_Form.

Here's the scenario :

$form = new MyNewBlogPost():
if( User == "RegularPoster")
   add 1 to the hidden field SuperUser...
          
   I'm not sure how to do that.

Thanks
JA.
 


没有评论: