3

Is there a way to set zend form details in the application config file (application.ini) in Zend Framework. I am looking for a way to move following details to config

  • A way to disable form decorators by default
  • set element Prefix Path
  • default decorator for different element type
  • validator path
  • plugin details
Bryan
  • 645
  • 1
  • 6
  • 18
  • 1
    yeah, those default decorators are a pain in the **** aren't they! I have ended up with a complete set of my own form_element_* so that I don't have to remove the default decorators every time. – vascowhite Nov 18 '11 at 02:08
  • Seems like storing some of that in your ini file is good, but I suspect you should extend Zend_Form and do most of this set up and use your extended form class for all of your forms. See [this answer](http://stackoverflow.com/questions/4191216/how-to-remove-all-dtddwrappers-and-labels-on-zend-form-elements/7654193#7654193) which shows an example of extending Zend_Form to easily change the default behavior. – drew010 Nov 18 '11 at 02:16

1 Answers1

0

Well you can check this link from the Zend Manual itself. It talks about using ini files to configure a form: Using a Zend_Config Object

You can add various configurations to your ini file and apply them to the form itself.

Songo
  • 5,618
  • 8
  • 58
  • 96