Re: [fw-general] Zend_Config_Writer promoted to standard/trunk
Hey cool, i´ll take a look on it. -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hey, today Zend_Config_Writer was promoted to the standard/trunk, and will be shipped with the ZF 1.7 release. It would be nice if some of you could use it in a practical test, so that in case I can fix bugs before the final release lefts the building. Regards, Ben - -- ... : ___ _ ___ ___ ___ _ ___: : | \ /_\ / __| _ \ _ (_) \ : : | |) / _ \\__ \ _/ / | |) | : : |___/_/:\_\___/_| |_|_\_|___/ : ::: : Web: http://www.dasprids.de : : E-mail : [EMAIL PROTECTED] : : Jabber : [EMAIL PROTECTED] : : ICQ: 105677955 : ::: -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkkKHOgACgkQ0HfT5Ws789CImQCfXXOMiDnh4aFjb5BWv7Y6W5y/ DsAAn1abr1k/tHbhB4sgxxgJj9b8Rzu/ =jkxt -END PGP SIGNATURE-
Re: [fw-general] FlashMessenger
CatharsisJelly wrote: I have a similar issue at the moment, did you find the solution for this? Actually, forget that I found my problem I was putting something into a different namespace. e.g. $this-_flashMessenger-setNamespace( 'error' ); $this-_flashMessenger-addMessage( 'Details not found, please check the username and password.' ); $this-_flashMessenger-resetNamespace(); Then trying to iterate through all the messages in the view by using foreach $this-messeges-getMessages() as $msg Of course this only pulled messages out from the default namespace. Change namespace in the view and hey presto. -- View this message in context: http://www.nabble.com/FlashMessenger-tp19805597p20262611.html Sent from the Zend Framework mailing list archive at Nabble.com.
[fw-general] Zend Form Validation
Hello, I am having a small problem with validating input I have everything setup correctlybut it seems that every time I submit the form it will always validate as true no matter what content is submitted in the form. - Nickolas Whiting Developer http://xstudiosinc.com Xstudios -- View this message in context: http://www.nabble.com/Zend-Form-Validation-tp20267185p20267185.html Sent from the Zend Framework mailing list archive at Nabble.com.
Re: [fw-general] Zend Form Validation
Matthew Weier O'Phinney-3 wrote: -- nwhiting [EMAIL PROTECTED] wrote (on Friday, 31 October 2008, 07:34 AM -0700): I am having a small problem with validating input I have everything setup correctlybut it seems that every time I submit the form it will always validate as true no matter what content is submitted in the form. Nobody can help you unless you provide your form details... -- Matthew Weier O'Phinney Software Architect | [EMAIL PROTECTED] Zend Framework | http://framework.zend.com/ heres the code i am using protected function _createElement($name, $label, $type, $value = null, $desc = null) { $element = null; switch($type) { case 'text': default: $element = new Zend_Form_Element_Text($name); $element-setOptions(array('maxlength' = 125)); break; case 'textarea': $element = new Zend_Form_Element_Textarea($name); $element-setOptions(array('rows' = 10, 'cols' = 35)); break; case 'password': $element = new Zend_Form_Element_Password($name); break; case 'file': $element = new Zend_Form_Element_File($name); break; case 'date': $element = new Zend_Form_Element_Text($name); $element-setOptions(array('dojoType' = dijit.form.DateTextBox)); break; case 'countryList': $locale = new Zend_Locale('en_US'); $countryList = ($locale-getCountryTranslationList()); asort($countryList, SORT_LOCALE_STRING); $element = new Zend_Form_Element_Select($name); $element-addMultiOptions($countryList); break; case 'stateList': $locale = new Zend_Locale('en_US'); $stateList = array('AL'=Alabama,'AK'=Alaska,'AZ'=Arizona,'AR'=Arkansas,'CA'=California,'CO'=Colorado,'CT'=Connecticut,'DE'=Delaware,'DC'=District Of Columbia,'FL'=Florida,'GA'=Georgia,'HI'=Hawaii,'ID'=Idaho,'IL'=Illinois,'IN'=Indiana,'IA'=Iowa,'KS'=Kansas,'KY'=Kentucky,'LA'=Louisiana,'ME'=Maine,'MD'=Maryland,'MA'=Massachusetts,'MI'=Michigan,'MN'=Minnesota,'MS'=Mississippi,'MO'=Missouri,'MT'=Montana,'NE'=Nebraska,'NV'=Nevada,'NH'=New Hampshire,'NJ'=New Jersey,'NM'=New Mexico,'NY'=New York,'NC'=North Carolina,'ND'=North Dakota,'OH'=Ohio,'OK'=Oklahoma,'OR'=Oregon,'PA'=Pennsylvania,'RI'=Rhode Island,'SC'=South Carolina,'SD'=South Dakota,'TN'=Tennessee,'TX'=Texas,'UT'=Utah,'VT'=Vermont,'VA'=Virginia,'WA'=Washington,'WV'=West Virginia,'WI'=Wisconsin,'WY'=Wyoming);$state = new Zend_Form_Element_Select('state'); $element = new Zend_Form_Element_Select($name); $element-addMultiOptions($stateList); break; } $element-setLabel(ucwords($label)); if ($value != null) { $element-setValue($value); } if ($desc != null) { $element-setDescription($desc); } $element-addValidator('alnum') -addValidator('regex', false, array('/^[a-z]/')) -setRequired(true); return $element; } and rending a element is simply $email = $this-_createElement('email', 'Email Address', 'text', $accountInfo['email']); and when i enter anything that is not validating aganist that it still validates as true - Nickolas Whiting Developer http://xstudiosinc.com Xstudios -- View this message in context: http://www.nabble.com/Zend-Form-Validation-tp20267185p20268151.html Sent from the Zend Framework mailing list archive at Nabble.com.
[fw-general] db table prefix from config
Hello, I'm following the Rob Allen's Getting started with zend framework tutorial (http://akrabat.com/zend-framework-tutorial/) and coming to the point of setting up the model I was wondering how I could take a table prefix from my .ini config file and use it.. Here is my solution: class Albums extends Zend_Db_Table { protected $_name = ''; public function __construct() { $this-_name =_TABLE_PFX.'albums'; parent::__construct(); } } I've set _TABLE_PFX in the bootstrap.php file reading it from the config (the .ini file): define('_TABLE_PFX', $config-db-table_pfx); Can you tell me is this solution can be considered ok or if there is a better way to achieve this? Thanks. Giovanni.
[fw-general] Flash Messenger
I'm working on a simple way of handling messages with Flash Messenger and would like any advice I can get before I dive in. First my flash message needs to handle a type of message, the error message itself and a way for the user to click a specific specified return to page link. So far all I see is that I can access the addMessage accessor. A work around is that the addMessage accessor accepts an array which is very useful. I can pass in an array knowing what to look for in my FlashController. Does below seem like a viable solution or is there a better way? I'm currently using Zend Framework 1.6. $this-_helper-flashMessenger-addMessage(array('error' = 'This is a test Flash message...', 'controller' = 'modules', 'action' = 'add')); $this-_redirect('/admin/flash'); Thanks Thomas Shaw [EMAIL PROTECTED]
[fw-general] [ANN] PHPNW08: Manchester PHP Conference approaches
Hi All, In case you've not come across this through any other means, I just thought I'd drop a note to let you know about PHPNW08. phpnw08 is a 1 day conference, to be held on Saturday 22nd November 2008, for developers, designers, managers or anyone else with an interest in the PHP programming language. The conference will have a range of well known as well as more local speakers and aims to highlight current best practice and emerging topics within the sphere of PHP and web development. The 1st annual PHPNW conference will be held on Saturday 22nd November at Manchester Central and will bring together the North-of-England PHP community for a one-day event of exceptional presentations, challenging workshops, sensational debates and networking events. Conference site: http://conference.phpnw.org.uk/phpnw08/ http://www.linkedin.com/redirect?url=http%3A%2F%2Fconference%2Ephpnw%2Eorg%2Euk%2Fphpnw08%2Furlhash=F4j3_t=disc_detail_link Register at http://conference.phpnw.org.uk/phpnw08/register/ http://www.linkedin.com/redirect?url=http%3A%2F%2Fconference%2Ephpnw%2Eorg%2Euk%2Fphpnw08%2Fregister%2Furlhash=3H7S_t=disc_detail_link It would be good to see you there :) Cheers, Jeremy
[fw-general] Zend_Db - get the column names of a row
Hi I used fetchRow of Zend_Db_Table_Abstract. Now I would like to display all the columns name and their value of that row, wihout knowing its column names Usually to get a value I use $row-xyz but in this case I don't know 'xyz', I would like to display all columns + values, hope I am clear How can I achieve this ? Thank you for any tips ! -- View this message in context: http://www.nabble.com/Zend_Db---get-the-column-names-of-a-row-tp20271015p20271015.html Sent from the Zend Framework mailing list archive at Nabble.com.
Re: [fw-general] Zend_Db - get the column names of a row
You can do this: $row = $table-fetchRow($where) $cols = $table-info(Zend_Db_Table_Abstract::COLS); foreach ($cols as $col) { echo $col . ' = ' . $row-$col . PHP_EOL; } debussy007 escreveu: Hi I used fetchRow of Zend_Db_Table_Abstract. Now I would like to display all the columns name and their value of that row, wihout knowing its column names Usually to get a value I use $row-xyz but in this case I don't know 'xyz', I would like to display all columns + values, hope I am clear How can I achieve this ? Thank you for any tips ! -- Felipe Weckx [EMAIL PROTECTED] MT4 Tecnologia (11) 3064-3226
Re: [fw-general] Zend Feed Rss XML and Entities for special chars
solved ! :) needed to convert titles and all stuff from ISO-8859-1 to UTF-8 (I used utf8_encode) and this BEFORE doing the saveXML I mean, while actually building the feed ! Apparently, from what I read on the net, the DomDocument uses utf-8 inside, even if I save the xml output as a ISO-88591-1 Also notice that you wont see the right character if you test the PHP code from a DOS-prompt... guess the dos prompt is using the windows cp encoding :) If I save out to a file and then open the file, everything is ok :) Hope this helps whoever may need it thank you -- View this message in context: http://www.nabble.com/Zend-Feed-Rss-XML-and-Entities-for-special-chars-tp20234717p20272668.html Sent from the Zend Framework mailing list archive at Nabble.com.
[fw-general] And the winner is. . .
Stefan Gehrig, who emailed me exactly 8 minutes after my original post (note to self: make question harder next time). The question: Correctly identify the original source of the foot image on this page: http://framework.zend.com/wiki/display/ZFDEV/Home. The answer: While many people correctly noted that the foot was also used in the title sequence of Monty Python's Flying Circus, the original painting that Terry Gilliam clipped it from is described here http://en.wikipedia.org/wiki/Venus,_Cupid,_Folly,_and_Time. Look in the lower left-hand corner. Apparently the foot originally squashed a pigeon. :/ Others who mailed me with the correct answer were: Stephan Sturm Christopher Mann Ben Scholzen (with assistance from Kieran Hall (who got it on the first try) Johannes Schill Jurriën Stutterheim ,Wil
[fw-general] Re[fw-general] stricting display of links to non-authorized pages in view scripts- how to?
I managed to set up authentication through Zend_Auth and access control through Zend_Acl. This works without any problem. However, I'd like to take things one step further. My view scripts sometimes display links to pages that are not accessible by the logged in user, because that user does not have the proper rights to view that page. Think of an edit link next to a blog article. If only the author of the article is allowed (via Zend_Acl) to edit the article, then it makes no sense to display the edit link to other users as well, as clicking on the link will only send them to a not authorised page. Is there a convenient way of dealing with this problem? I'm sure it's a common request so I was hoping someone could help me with it. Thanks in advance. -- View this message in context: http://www.nabble.com/Restricting-display-of-links-to-non-authorized-pages-in-view-scripts--how-to--tp20273593p20273593.html Sent from the Zend Framework mailing list archive at Nabble.com.
[fw-general] Now how do I get a Zend Framework shirt?
OK, since I had to turn away so many people with the correct answer, I'll give y'all another shot at it. As everyone should know, bughunt week starts Sunday (11:59 PST to be exact), 11/2 and runs until Saturday (11:59 PST to be exact), 11/8. I will give out a t-shirt for the 3 contributors who resolved the most bugs as 'fixed' during that time. Some rules: * Bugs must be fixed with a corresponding commit specifying the bug ID and a regression unit test also specifying the bug ID in the docblock like '@group ZF-'. No other resolution will count towards your total, although you should really be nice and resolve those that don't require a fix anyways. All right, how about this? If there are any ties, total resolved bugs will be used to break it. * Since this is a bughunt, only issues of type 'Bug' count. * Do *not* assign an issue to yourself until you are ready to work on it. At the time of assignment, click 'start progress' to mark it as 'in progress' so that no one else starts work on it. * If anyone does anything to the detriment of the project or one of the other contributors, s/he will be disqualified or publically humiliated at my discretion. * If I've missed any pertinent rule above, you get the general idea. I reserve the right to add and/or change rules at any point. * Most importantly: Don't do it for the shirt, do it for the greater ZF good. ,Wil
[fw-general] Re: Re[fw-general] stricting display of links to non-authorized pages in view scripts- how to?
bytte wrote: I managed to set up authentication through Zend_Auth and access control through Zend_Acl. This works without any problem. However, I'd like to take things one step further. My view scripts sometimes display links to pages that are not accessible by the logged in user, because that user does not have the proper rights to view that page. Think of an edit link next to a blog article. If only the author of the article is allowed (via Zend_Acl) to edit the article, then it makes no sense to display the edit link to other users as well, as clicking on the link will only send them to a not authorised page. Is there a convenient way of dealing with this problem? I'm sure it's a common request so I was hoping someone could help me with it. Thanks in advance. Pass the edit link based on the Acl level to the view instead of trying to do it in the view :) - Nickolas Whiting Developer http://xstudiosinc.com Xstudios -- View this message in context: http://www.nabble.com/Restricting-display-of-links-to-non-authorized-pages-in-view-scripts--how-to--tp20273593p20273947.html Sent from the Zend Framework mailing list archive at Nabble.com.
[fw-general] Zend_ProgressBar promoted to standard/trunk
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hey, and again another componented promoted to standard/trunk; Zend_ProgressBar is ready for your piggy hands and will as well be shipped with the ZF 1.7 release. Again I'd like you to test the component in some enviroment to find some maybe hidden bugs or give last suggestions for improvements. Regards, Ben - -- ... : ___ _ ___ ___ ___ _ ___: : | \ /_\ / __| _ \ _ (_) \ : : | |) / _ \\__ \ _/ / | |) | : : |___/_/:\_\___/_| |_|_\_|___/ : ::: : Web: http://www.dasprids.de : : E-mail : [EMAIL PROTECTED] : : Jabber : [EMAIL PROTECTED] : : ICQ: 105677955 : ::: -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkkLcscACgkQ0HfT5Ws789ACZACeLIhwhA39M1t5UOuzyNqBWIAg djYAnRXDYfFozVuZrxfMhe//5yDFG0RN =jHvz -END PGP SIGNATURE-
Re: [fw-general] Zend_Form Decorators explanation
wenbert wrote: I have this: pre $elementDecorators = array( 'ViewHelper', 'Errors', 'Description', array(array('data' = 'HtmlTag'), array('tag' = 'dd', 'class' = 'element')), array('Label', array('tag' = 'dt'), array(array('row' = 'HtmlTag'), array('tag' = 'dt')), )); $this-addElement('text', 'emp_lastname', array( 'decorators' = $this-elementDecorators, 'label' = 'Employee Lastname:', 'required' = true, 'attribs' = array( 'id'='emp_lastname', 'class'='normal_text_box' ) )); IT OUTPUTS SOMETHING LIKE THIS: dt label for=emp_lastname class=requiredEmployee Lastname:/label /dt dd class=element input type=text name=emp_lastname id=emp_lastname value= class=normal_text_box / /dd /pre Can you explain me how the array $elementDecorator works? Especially the arrays after 'Description'... Thanks so much! Regards, Wenbert The way the decorators works is by parsing the options passed in the array that is defined by them. So the above example the decorator options array is being set to 'ViewHelper' 'Errors' and 'Description', you could set your own decorators for each by using instead here is a small example to better explain this for you and get you started. $this-setElementDecorators(array( 'ViewHelper', array( array( 'inputOpen' = 'HtmlTag', ), array('tag' = 'div', 'class' = 'formDataRight', 'openOnly' = true ), 'placement' = Zend_Form_Decorator_Abstract::PREPEND ), array('Description', array( 'placement' = array('inputClose', 'prepend'), 'tag' = 'div', 'class' = 'helpLine') ), array('Errors', array('tag' = 'div', 'placement' = 'prepend', 'class' = 'helpline' ) ), - Nickolas Whiting Developer http://xstudiosinc.com Xstudios -- View this message in context: http://www.nabble.com/Zend_Form-Decorators-explanation-tp20261370p20274012.html Sent from the Zend Framework mailing list archive at Nabble.com.
[fw-general] Re: Re[fw-general] stricting display of links to non-authorized pages in view scripts- how to?
You could make a view helper. Here's mine, you'd need to adjust to taste: class My_View_Helper_IsAllowed extends Zend_View_Helper_Abstract { public function isAllowed($resource = null, $privilege = null) { $front = Zend_Controller_Front::getInstance(); if ($front-hasPlugin('App_Controller_Plugin_Auth')) { $authPlugin = $front-getPlugin('App_Controller_Plugin_Auth'); $identity = Zend_Auth::getInstance()-getIdentity(); $role = (!empty($identity) isset($identity-id)) ? '#user_'.$identity-id : null; $retval = false; try { $retval = $authPlugin-acl-isAllowed($role, $resource, $privilege); } catch (Exception $ex) { } return $retval; } return false; } } Then in the views you could do: ?php if ($this-isAllowed('admin_user', 'index')) { ? li ?=$this- url(array('module'='admin', 'controller'='user'), null, true)?Manage Users ?php } ? bytte wrote: I managed to set up authentication through Zend_Auth and access control through Zend_Acl. This works without any problem. However, I'd like to take things one step further. My view scripts sometimes display links to pages that are not accessible by the logged in user, because that user does not have the proper rights to view that page. Think of an edit link next to a blog article. If only the author of the article is allowed (via Zend_Acl) to edit the article, then it makes no sense to display the edit link to other users as well, as clicking on the link will only send them to a not authorised page. Is there a convenient way of dealing with this problem? I'm sure it's a common request so I was hoping someone could help me with it. Thanks in advance. -- View this message in context: http://www.nabble.com/Restricting-display-of-links-to-non-authorized-pages-in-view-scripts--how-to--tp20273593p20274511.html Sent from the Zend Framework mailing list archive at Nabble.com.
[fw-general] Re: Re[fw-general] stricting display of links to non-authorized pages in view scripts- how to?
Thanks Martin, That's what I did so far, but I'm not happy with all those 'if/else' clauses in my view script. I was hoping for a better way. Chris Martin wrote: You could make a view helper. -- View this message in context: http://www.nabble.com/Restricting-display-of-links-to-non-authorized-pages-in-view-scripts--how-to--tp20273593p20274602.html Sent from the Zend Framework mailing list archive at Nabble.com.
[fw-general] Re: Re[fw-general] stricting display of links to non-authorized pages in view scripts- how to?
Thanks nwhiting, but links and such are view information, right? So don't they belong in the view? Think of an image linking to an edit page... nwhiting wrote: Pass the edit link based on the Acl level to the view instead of trying to do it in the view :) -- View this message in context: http://www.nabble.com/Restricting-display-of-links-to-non-authorized-pages-in-view-scripts--how-to--tp20273593p20274623.html Sent from the Zend Framework mailing list archive at Nabble.com.
Re: [fw-general] db table prefix from config
On 31 Oct 2008, at 15:37, Giovanni A. D. wrote: Hello, I'm following the Rob Allen's Getting started with zend framework tutorial (http://akrabat.com/zend-framework-tutorial/) and coming to the point of setting up the model I was wondering how I could take a table prefix from my .ini config file and use it.. Here is my solution: class Albums extends Zend_Db_Table { protected $_name = ''; public function __construct() { $this-_name =_TABLE_PFX.'albums'; parent::__construct(); } } I've set _TABLE_PFX in the bootstrap.php file reading it from the config (the .ini file): define('_TABLE_PFX', $config-db-table_pfx); Can you tell me is this solution can be considered ok or if there is a better way to achieve this? Hi, I would probably extend Zend_Db_Table_Abstract and automatically add the prefix when setting up the table name. Something like this: class App_Db_Table_Abstract extends Zend_Db_Table_Abstract { protected function _setupTableName() { parent::_setupTableName(); $config = Zend_Registry('config'); $prefix = $config-db-table_pfx; $this-_name = $prefix . '_' . $this-_name; } } Then in the Albums class, you can use carry on as normal and the prefix is auto-magically prepended: class Albums extends App_Db_Table_Abstract { $this-_name = 'albums'; } Regards, Rob...
[fw-general] Re: Re[fw-general] stricting display of links to non-authorized pages in view scripts- how to?
You could potentially make something like a isAllowedUrl($module, $controller, $action) view helper that checks the permissions and renders the link itself, but you might lose flexibility when wanting to include/exclude other html decorators and such. bytte wrote: Thanks Martin, That's what I did so far, but I'm not happy with all those 'if/else' clauses in my view script. I was hoping for a better way. Chris Martin wrote: You could make a view helper. -- View this message in context: http://www.nabble.com/Restricting-display-of-links-to-non-authorized-pages-in-view-scripts--how-to--tp20273593p20274777.html Sent from the Zend Framework mailing list archive at Nabble.com.
[fw-general] ZendX_Console_Process_Unix promoted to extras/trunk
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hey guys, It seems that I currently can't stop to promote new components to the trunks. This time it's ZendX_Console_Process_Unix. Again I'd like to get bug- and improvement messages from you. Regards, Ben - -- ... : ___ _ ___ ___ ___ _ ___: : | \ /_\ / __| _ \ _ (_) \ : : | |) / _ \\__ \ _/ / | |) | : : |___/_/:\_\___/_| |_|_\_|___/ : ::: : Web: http://www.dasprids.de : : E-mail : [EMAIL PROTECTED] : : Jabber : [EMAIL PROTECTED] : : ICQ: 105677955 : ::: -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkkLnXEACgkQ0HfT5Ws789DEGQCeM8cD024Cj0fOR0+YR6jbRNYA X3kAnR81szlEgWQhkOVItgSzW9wY8C9V =bFDA -END PGP SIGNATURE-
[fw-general] New Zend_Validate_File_Hash class added to trunk
Hy guys, a new Hash validator class has been added. It supports 34 different algorithms which can be used to validate the file content against. I hope you find it usefull. Feel free to test it. Greetings Thomas Weidner, I18N Team Leader, Zend Framework http://www.thomasweidner.com
[fw-general] Dijit elements and xhrPost
I am attempting to do an in-line editing solution that has dijit elements declared in a form that then have an xhrPost action that updates the data and returns the form again. The problem that I'm encountering is that when the div is returned, the form elements are no longer Dojo-ized - they are plain html form elements. When I first hit the page, the elements are created and display properly, it's just after the xhrPost that I am having issues. The end of my xhrPost action is like this: $this-view-lineItems = $lineItems-toArray(); $this-view-info = $invoice-toArray(); $this-_helper-layout-disableLayout(); $this-view-addHelperPath('Zend/Dojo/View/Helper/', 'Zend_Dojo_View_Helper'); Zend_Dojo::enableView($this-view); $this-render('editLineItemsPartial'); I've tried various variations, and I can't seem to get the partial to render correctly after it hits this action. I've also tried to activate dojo in the partial, but that doesn't seem to work either. Any suggestions? -Mark - Mark Garrett DailyDNA Arkadelphia, AR (Telecommuting to: Rogue River, OR) -- View this message in context: http://www.nabble.com/Dijit-elements-and-xhrPost-tp20276334p20276334.html Sent from the Zend Framework mailing list archive at Nabble.com.
Re: [fw-general] Zend_Form Decorators explanation
nwhiting wrote: wenbert wrote: I have this: pre $elementDecorators = array( 'ViewHelper', 'Errors', 'Description', array(array('data' = 'HtmlTag'), array('tag' = 'dd', 'class' = 'element')), array('Label', array('tag' = 'dt'), array(array('row' = 'HtmlTag'), array('tag' = 'dt')), )); $this-addElement('text', 'emp_lastname', array( 'decorators' = $this-elementDecorators, 'label' = 'Employee Lastname:', 'required' = true, 'attribs' = array( 'id'='emp_lastname', 'class'='normal_text_box' ) )); IT OUTPUTS SOMETHING LIKE THIS: dt label for=emp_lastname class=requiredEmployee Lastname:/label /dt dd class=element input type=text name=emp_lastname id=emp_lastname value= class=normal_text_box / /dd /pre Can you explain me how the array $elementDecorator works? Especially the arrays after 'Description'... Thanks so much! Regards, Wenbert The way the decorators works is by parsing the options passed in the array that is defined by them. So the above example the decorator options array is being set to 'ViewHelper' 'Errors' and 'Description', you could set your own decorators for each by using instead here is a small example to better explain this for you and get you started. $this-setElementDecorators(array( 'ViewHelper', array( array( 'inputOpen' = 'HtmlTag', ), array('tag' = 'div', 'class' = 'formDataRight', 'openOnly' = true ), 'placement' = Zend_Form_Decorator_Abstract::PREPEND ), array('Description', array( 'placement' = array('inputClose', 'prepend'), 'tag' = 'div', 'class' = 'helpLine') ), array('Errors', array('tag' = 'div', 'placement' = 'prepend', 'class' = 'helpline' ) ), Thank you for your reply. I have another question: What is in the 3rd array after the 'Description'? array(array('row' = 'HtmlTag'), array('tag' = 'dt')), I have seen people use TRs for table rows in this part. What else can I pass in the setElementDecorators() function? Seriously, thanks for the short example you gave above. It is shedding some light already ;) - http://blog.ekini.net -- View this message in context: http://www.nabble.com/Zend_Form-Decorators-explanation-tp20261370p20277468.html Sent from the Zend Framework mailing list archive at Nabble.com.