Results 1 to 2 of 2

Thread: Problem with zend_form in zend_config

  1. #1
    troylmarker is offline Junior Member
    Join Date
    Jan 2012
    Posts
    1

    Default Problem with zend_form in zend_config

    Greeting to all. I am having an issue I can not figure out, even after searching documentations. I have forms for an application I am developing form a project at school. I first stared using XML basied config file to create the forms, but was not happy with the warning messages I got with Zend Studio. I decided to conver them to Ini based configs, to get rid of the warning messages, an ran into an issue. The Xml configs are working just fine, but for some reason the Ini one are not. Listed below is the error message I get.

    Code:
    Application error
    
    Exception information:
    
    Message: No valid elements specified for display group  
    Stack trace:
    
    
    #0 C:\Program Files (x86)\Zend\ZendServer\share\ZendFramework\library\Zend\Form.php(1912): Zend_Form->addDisplayGroup(Array, 'submit', Array)
    #1 C:\Program Files (x86)\Zend\ZendServer\share\ZendFramework\library\Zend\Form.php(1948): Zend_Form->addDisplayGroups(Array)#
    2 C:\Program Files (x86)\Zend\ZendServer\share\ZendFramework\library\Zend\Form.php(372): Zend_Form->setDisplayGroups(Array)#
    3 C:\Program Files (x86)\Zend\ZendServer\share\ZendFramework\library\Zend\Form.php(397): Zend_Form->setOptions(Array)
    #4 C:\Program Files (x86)\Zend\ZendServer\share\ZendFramework\library\Zend\Form.php(236): Zend_Form->setConfig(Object(Zend_Config))
    #5 C:\Program Files (x86)\Zend\Elite\application\controllers\CustomersController.php(85): Zend_Form->__construct(Object(Zend_Config))
    #6 C:\Program Files (x86)\Zend\ZendServer\share\ZendFramework\library\Zend\Controller\Action.php(516): CustomersController->registerAction()
    #7 C:\Program Files (x86)\Zend\ZendServer\share\ZendFramework\library\Zend\Controller\Dispatcher\Standard.php(295): Zend_Controller_Action->dispatch('registerAction')
    #8 C:\Program Files (x86)\Zend\ZendServer\share\ZendFramework\library\Zend\Controller\Front.php(954): Zend_Controller_Dispatcher_Standard->dispatch(Object(Zend_Controller_Request_Http), Object(Zend_Controller_Response_Http))
    #9 C:\Program Files (x86)\Zend\ZendServer\share\ZendFramework\library\Zend\Application\Bootstrap\Bootstrap.php(97): Zend_Controller_Front->dispatch()
    #10 C:\Program Files (x86)\Zend\ZendServer\share\ZendFramework\library\Zend\Application.php(366): Zend_Application_Bootstrap_Bootstrap->run()
    #11 C:\Program Files (x86)\Zend\Elite\public\index.php(26): Zend_Application->run()
    #12 {main}
    And below is the part of the Ini config file I beleive is the problem.

    Code:
    ;Form Element - Submit
    registration.form.elements.submit.type = "submit"
    registration.form.elements.submit.options.label = "Process Order"
    Code:
    ;Form Display Group 3
    registration.form.displaygroups.group3.name = "submit"
    registration.form.displaygroups.group3.options.legend = ""
    registration.form.displaygroups.group3.options.decorators.formelements.decorator = "FormElements"
    registration.form.displaygroups.group3.options.decorators.fieldset.decorator = "Fieldset"    
    registration.form.displaygroups.group3.options.decorators.fieldset.options.style = "width:175px;float:left;margin-left:8px;border:0px;"
    registration.form.displaygroups.group3.elements.submit = "submit"
    
    Any help on this would be greatly appreciated. I more information is needed, I will be happy to supply it.

    Thank,
    Troy

  2. #2
    akrabat is offline Junior Member
    Join Date
    Feb 2012
    Posts
    1

    Default

    Hi,


    The display group's elements property is an array. Try:

    Code:
    registration.form.displaygroups.group3.elements.0 = "submit"
    Though, it's possible that you can't do a single element in a group with Zend_Config's INI format.

    Regards,

    Rob...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •