Zend FR

Consultez la FAQ sur le ZF avant de poster une question

Vous n'êtes pas identifié.

#1 20-04-2014 21:03:29

daverck
Membre
Date d'inscription: 14-09-2009
Messages: 30

[Résolu][Zend_Form][1.12.6] gros problème avec les decorators

Bonjour smile

J'obtiens l'erreur suivante avec mon formulaire ci-dessous

J'ai essayé de réécrire les fonctions setDescriptionDecorators et  getDojoElements comme indiqué dans ce thread  sans succès.

merci d'avance à ceux qui voudront bien se pencher sur le problème smile

Code:

[Sun Apr 20 20:49:14.487522 2014] [:error] [pid 3638] [client 127.0.0.1:59996] PHP Catchable fatal error:  Argument 4 passed to Zend_Dojo_View_Helper_ValidationTextBox::validationTextBox() must be of the type array, null given in /var/www/gnosis/library/Zend/Dojo/View/Helper/ValidationTextBox.php on line 64, referer: http://127.0.0.15/exercice/index/

Attention c'est un long formulaire ! :p

Code:

[lang=php]<?php

class Default_Form_Exercice10 extends Zend_Dojo_Form
{
        
    public function init()
    {
        // Set the method for the form to POST
        $this->setDescription("exercice10 saving form")
             ->setEnctype(Zend_Dojo_Form::ENCTYPE_URLENCODED)
             ->setName("exercice10_form")
             ->setAction('')
             ->setMethod('post');
        
        // for translation
        //$translate = Zend_Registry::get('translate');
        
        //creating subforms
        $exercice10_subform1 = new Zend_Dojo_Form_SubForm();
        $exercice10_subform2 = new Zend_Dojo_Form_SubForm();
        $exercice10_subform3 = new Zend_Dojo_Form_SubForm();
        $exercice10_subform4 = new Zend_Dojo_Form_SubForm();
        $exercice10_subform5 = new Zend_Dojo_Form_SubForm();
        $exercice10_subform6 = new Zend_Dojo_Form_SubForm();
        $exercice10_subform7 = new Zend_Dojo_Form_SubForm();
        $exercice10_subform8 = new Zend_Dojo_Form_SubForm();
        $exercice10_subform9 = new Zend_Dojo_Form_SubForm();
        $exercice10_subform10 = new Zend_Dojo_Form_SubForm();
        
        // Association of subform with the form :
        $this->addSubForm($exercice10_subform1,
                'exercice10_subform1',
                0
        );
        // Association of subform with the form :
        $this->addSubForm($exercice10_subform2,
                'exercice10_subform2',
                1
        );
        // Association of subform with the form :
        $this->addSubForm($exercice10_subform3,
                'exercice10_subform3',
                2
        );
        // Association of subform with the form :
        $this->addSubForm($exercice10_subform4,
                'exercice10_subform4',
                3
        );
        // Association of subform with the form :
        $this->addSubForm($exercice10_subform5,
                'exercice10_subform5',
                4
        );
        // Association of subform with the form :
        $this->addSubForm($exercice10_subform6,
                'exercice10_subform6',
                5
        );
        // Association of subform with the form :
        $this->addSubForm($exercice10_subform7,
                'exercice10_subform7',
                6
        );
        // Association of subform with the form :
        $this->addSubForm($exercice10_subform8,
                'exercice10_subform8',
                7
        );
        // Association of subform with the form :
        $this->addSubForm($exercice10_subform9,
                'exercice10_subform9',
                8
        );
        // Association of subform with the form :
        $this->addSubForm($exercice10_subform10,
                'exercice10_subform10',
                9
        );
        
        
        ////////////////////////////
        // exercice10 elements    //
        ////////////////////////////
        
        // Add a save button
        $this->addElement('submit', 'exercice10_submit', array(
                                                    'ignore'       => true,
                                                    'label'     => 'Save',
                                                    'class'        => 'static')
                        );
                        
//        // And finally add some CSRF protection
//        $this->addElement('hash', 'exercice10_csrf', array(
//                                                'ignore' => true
//                                                    )
//                        );


        //First question :
        // Add a exercice10 name element
        $exercice10_subform1->addElement('validationTextBox', 'exercice10 1-1', array(
                                                'label'      => 'exercice10 name :',
                                                'required'   => true,
                                                'filters'    => array('StripTags',
                                                                    'StringTrim'),
                                                'regExp'         => '^[\sa-zA-Z0-9_-]{6,60}$',
                                                //'ErrorMessages' => array('required'=> '$translate->_("Ce champs est vide : vous devez le compléter")'),
                                                //'invalidMessage' => 'Invalid exercice10 name must be between 6 and 60 alphanumeric characters',
                                                'promptMessage'    => 'Enter your exercice10 answer',
                                                'id'            => 'exercice10_1-1',
                                                'class'            => 'static'
                                                    ),
                                                    array()
                            );
                            
        $exercice10_subform1->addElement('validationTextBox', 'exercice10 1-2', array(
                                                'label'      => 'exercice10 name :',
                                                'required'   => true,
                                                'filters'    => array('StripTags',
                                                                    'StringTrim'),
                                                'regExp'         => '^[\sa-zA-Z0-9_-]{6,60}$',
                                                //'ErrorMessages' => array('required'=> '$translate->_("Ce champs est vide : vous devez le compléter")'),
                                                //'invalidMessage' => 'Invalid exercice10 name must be between 6 and 60 alphanumeric characters',
                                                'promptMessage'    => 'Enter your exercice10 answer',
                                                'id'            => 'exercice10_1-2',
                                                'class'            => 'static'
                                                    ),
                                                    array()
                            );
                            
        $exercice10_subform1->addElement('validationTextBox', 'exercice10 1-3', array(
                                                'label'      => 'exercice10 name :',
                                                'required'   => true,
                                                'filters'    => array('StripTags',
                                                                    'StringTrim'),
                                                'regExp'         => '^[\sa-zA-Z0-9_-]{6,60}$',
                                                //'ErrorMessages' => array('required'=> '$translate->_("Ce champs est vide : vous devez le compléter")'),
                                                //'invalidMessage' => 'Invalid exercice10 name must be between 6 and 60 alphanumeric characters',
                                                'promptMessage'    => 'Enter your exercice10 answer',
                                                'id'            => 'exercice10_1-3',
                                                'class'            => 'static'
                                                    ),
                                                    array()
                            );

        $exercice10_subform1->addElement('validationTextBox', 'exercice10 1-4', array(
                                                'label'      => 'exercice10 name :',
                                                'required'   => true,
                                                'filters'    => array('StripTags',
                                                                    'StringTrim'),
                                                'regExp'         => '^[\sa-zA-Z0-9_-]{6,60}$',
                                                //'ErrorMessages' => array('required'=> '$translate->_("Ce champs est vide : vous devez le compléter")'),
                                                //'invalidMessage' => 'Invalid exercice10 name must be between 6 and 60 alphanumeric characters',
                                                'promptMessage'    => 'Enter your exercice10 answer',
                                                'id'            => 'exercice10_1-4',
                                                'class'            => 'static'
                                                    ),
                                                    array()
                            );

        $exercice10_subform1->addElement('validationTextBox', 'exercice10 1-5', array(
                                                'label'      => 'exercice10 name :',
                                                'required'   => true,
                                                'filters'    => array('StripTags',
                                                                    'StringTrim'),
                                                'regExp'         => '^[\sa-zA-Z0-9_-]{6,60}$',
                                                //'ErrorMessages' => array('required'=> '$translate->_("Ce champs est vide : vous devez le compléter")'),
                                                //'invalidMessage' => 'Invalid exercice10 name must be between 6 and 60 alphanumeric characters',
                                                'promptMessage'    => 'Enter your exercice10 answer',
                                                'id'            => 'exercice10_1-5',
                                                'class'            => 'static'
                                                    ),
                                                    array()
                            );
                            
                            
           // Add a Course answer element
        $exercice10_subform1->addElement('ComboBox', 'course_answer_1', array(
                                                'label'      => 'Answer :',
                                                'required'   => true,
                                                'value'        => 'original',
                                                'autocomplete' => true,
                                                'multiOptions' => array('1'    => '$translate->_("1")',
                                                                        '2'    => '$translate->_("2")',
                                                                        '3'    => '$translate->_("3")',
                                                                        '4'    => '$translate->_("4")',
                                                                        '5'    => '$translate->_("5")',),
                                                'ErrorMessages' => array('required'=>'Element requis'),
                                                'promptMessage'    => 'Enter answer',
                                                'id'            => 'course_answer_1',
                                                'class'            => 'static',
                                                'invalidMessage' => 'Invalid type',
                                                            )
                            );

        //Second question :
        // Add a exercice10 name element
        $exercice10_subform2->addElement('validationTextBox', 'exercice10 2-1', array(
                                                'label'      => 'exercice10 name :',
                                                'required'   => true,
                                                'filters'    => array('StripTags',
                                                                    'StringTrim'),
                                                'regExp'         => '^[\sa-zA-Z0-9_-]{6,60}$',
                                                //'ErrorMessages' => array('required'=> '$translate->_("Ce champs est vide : vous devez le compléter")'),
                                                //'invalidMessage' => 'Invalid exercice10 name must be between 6 and 60 alphanumeric characters',
                                                'promptMessage'    => 'Enter your exercice10 answer',
                                                'id'            => 'exercice10_2-1',
                                                'class'            => 'static'
                                                    ),
                                                array()
                            );
                            
        $exercice10_subform2->addElement('validationTextBox', 'exercice10 2-2', array(
                                                'label'      => 'exercice10 name :',
                                                'required'   => true,
                                                'filters'    => array('StripTags',
                                                                    'StringTrim'),
                                                'regExp'         => '^[\sa-zA-Z0-9_-]{6,60}$',
                                                //'ErrorMessages' => array('required'=> '$translate->_("Ce champs est vide : vous devez le compléter")'),
                                                //'invalidMessage' => 'Invalid exercice10 name must be between 6 and 60 alphanumeric characters',
                                                'promptMessage'    => 'Enter your exercice10 answer',
                                                'id'            => 'exercice10_2-2',
                                                'class'            => 'static'
                                                    ),
                                                array()
                            );
                            
        $exercice10_subform2->addElement('validationTextBox', 'exercice10 2-3', array(
                                                'label'      => 'exercice10 name :',
                                                'required'   => true,
                                                'filters'    => array('StripTags',
                                                                    'StringTrim'),
                                                'regExp'         => '^[\sa-zA-Z0-9_-]{6,60}$',
                                                //'ErrorMessages' => array('required'=> '$translate->_("Ce champs est vide : vous devez le compléter")'),
                                                //'invalidMessage' => 'Invalid exercice10 name must be between 6 and 60 alphanumeric characters',
                                                'promptMessage'    => 'Enter your exercice10 answer',
                                                'id'            => 'exercice10_2-3',
                                                'class'            => 'static'
                                                    ),
                                                array()
                            );

        $exercice10_subform2->addElement('validationTextBox', 'exercice10 2-4', array(
                                                'label'      => 'exercice10 name :',
                                                'required'   => true,
                                                'filters'    => array('StripTags',
                                                                    'StringTrim'),
                                                'regExp'         => '^[\sa-zA-Z0-9_-]{6,60}$',
                                                //'ErrorMessages' => array('required'=> '$translate->_("Ce champs est vide : vous devez le compléter")'),
                                                //'invalidMessage' => 'Invalid exercice10 name must be between 6 and 60 alphanumeric characters',
                                                'promptMessage'    => 'Enter your exercice10 answer',
                                                'id'            => 'exercice10_2-4',
                                                'class'            => 'static'
                                                    ),
                                                array()
                            );

        $exercice10_subform2->addElement('validationTextBox', 'exercice10 2-5', array(
                                                'label'      => 'exercice10 name :',
                                                'required'   => true,
                                                'filters'    => array('StripTags',
                                                                    'StringTrim'),
                                                'regExp'         => '^[\sa-zA-Z0-9_-]{6,60}$',
                                                //'ErrorMessages' => array('required'=> '$translate->_("Ce champs est vide : vous devez le compléter")'),
                                                //'invalidMessage' => 'Invalid exercice10 name must be between 6 and 60 alphanumeric characters',
                                                'promptMessage'    => 'Enter your exercice10 answer',
                                                'id'            => 'exercice10_2-5',
                                                'class'            => 'static'
                                                    ),
                                                array()
                            );
                            
           // Add a Course answer element
        $exercice10_subform2->addElement('ComboBox', 'course_answer_2', array(
                                                'label'      => 'Answer :',
                                                'required'   => true,
                                                'value'        => 'original',
                                                'autocomplete' => true,
                                                'multiOptions' => array('1'    => '$translate->_("1")',
                                                                        '2'    => '$translate->_("2")',
                                                                        '3'    => '$translate->_("3")',
                                                                        '4'    => '$translate->_("4")',
                                                                        '5'    => '$translate->_("5")',),
                                                'ErrorMessages' => array('required'=>'Element requis'),
                                                'promptMessage'    => 'Enter answer',
                                                'id'            => 'course_answer_2',
                                                'class'            => 'static',
                                                'invalidMessage' => 'Invalid type',
                                                            )
                            );                            
        //Third question :
        // Add a exercice10 name element
        $exercice10_subform3->addElement('validationTextBox', 'exercice10 3-1', array(
                                                'label'      => 'exercice10 name :',
                                                'required'   => true,
                                                'filters'    => array('StripTags',
                                                                    'StringTrim'),
                                                'regExp'         => '^[\sa-zA-Z0-9_-]{6,60}$',
                                                //'ErrorMessages' => array('required'=> '$translate->_("Ce champs est vide : vous devez le compléter")'),
                                                //'invalidMessage' => 'Invalid exercice10 name must be between 6 and 60 alphanumeric characters',
                                                'promptMessage'    => 'Enter your exercice10 answer',
                                                'id'            => 'exercice10_3-1',
                                                'class'            => 'static'
                                                    ),
                                                array()
                            );
                            
        $exercice10_subform3->addElement('validationTextBox', 'exercice10 3-2', array(
                                                'label'      => 'exercice10 name :',
                                                'required'   => true,
                                                'filters'    => array('StripTags',
                                                                    'StringTrim'),
                                                'regExp'         => '^[\sa-zA-Z0-9_-]{6,60}$',
                                                //'ErrorMessages' => array('required'=> '$translate->_("Ce champs est vide : vous devez le compléter")'),
                                                //'invalidMessage' => 'Invalid exercice10 name must be between 6 and 60 alphanumeric characters',
                                                'promptMessage'    => 'Enter your exercice10 answer',
                                                'id'            => 'exercice10_3-2',
                                                'class'            => 'static'
                                                    ),
                                                array()
                            );
                            
        $exercice10_subform3->addElement('validationTextBox', 'exercice10 3-3', array(
                                                'label'      => 'exercice10 name :',
                                                'required'   => true,
                                                'filters'    => array('StripTags',
                                                                    'StringTrim'),
                                                'regExp'         => '^[\sa-zA-Z0-9_-]{6,60}$',
                                                //'ErrorMessages' => array('required'=> '$translate->_("Ce champs est vide : vous devez le compléter")'),
                                                //'invalidMessage' => 'Invalid exercice10 name must be between 6 and 60 alphanumeric characters',
                                                'promptMessage'    => 'Enter your exercice10 answer',
                                                'id'            => 'exercice10_3-3',
                                                'class'            => 'static'
                                                    ),
                                                array()
                            );

        $exercice10_subform3->addElement('validationTextBox', 'exercice10 3-4', array(
                                                'label'      => 'exercice10 name :',
                                                'required'   => true,
                                                'filters'    => array('StripTags',
                                                                    'StringTrim'),
                                                'regExp'         => '^[\sa-zA-Z0-9_-]{6,60}$',
                                                //'ErrorMessages' => array('required'=> '$translate->_("Ce champs est vide : vous devez le compléter")'),
                                                //'invalidMessage' => 'Invalid exercice10 name must be between 6 and 60 alphanumeric characters',
                                                'promptMessage'    => 'Enter your exercice10 answer',
                                                'id'            => 'exercice10_3-4',
                                                'class'            => 'static'
                                                    ),
                                                array()
                            );

        $exercice10_subform3->addElement('validationTextBox', 'exercice10 3-5', array(
                                                'label'      => 'exercice10 name :',
                                                'required'   => true,
                                                'filters'    => array('StripTags',
                                                                    'StringTrim'),
                                                'regExp'         => '^[\sa-zA-Z0-9_-]{6,60}$',
                                                //'ErrorMessages' => array('required'=> '$translate->_("Ce champs est vide : vous devez le compléter")'),
                                                //'invalidMessage' => 'Invalid exercice10 name must be between 6 and 60 alphanumeric characters',
                                                'promptMessage'    => 'Enter your exercice10 answer',
                                                'id'            => 'exercice10_3-5',
                                                'class'            => 'static'
                                                    ),
                                                array()
                            );                            
                            
           // Add a Course answer element
        $exercice10_subform3->addElement('ComboBox', 'course_answer_3', array(
                                                'label'      => 'Answer :',
                                                'required'   => true,
                                                'value'        => 'original',
                                                'autocomplete' => true,
                                                'multiOptions' => array('1'    => '$translate->_("1")',
                                                                        '2'    => '$translate->_("2")',
                                                                        '3'    => '$translate->_("3")',
                                                                        '4'    => '$translate->_("4")',
                                                                        '5'    => '$translate->_("5")',),
                                                'ErrorMessages' => array('required'=>'Element requis'),
                                                'promptMessage'    => 'Enter answer',
                                                'id'            => 'course_answer_3',
                                                'class'            => 'static',
                                                'invalidMessage' => 'Invalid type',
                                                            )
                            );                            
                            
        //4th question :
        // Add a exercice10 name element
        $exercice10_subform4->addElement('validationTextBox', 'exercice10 4-1', array(
                                                'label'      => 'exercice10 name :',
                                                'required'   => true,
                                                'filters'    => array('StripTags',
                                                                    'StringTrim'),
                                                'regExp'         => '^[\sa-zA-Z0-9_-]{6,60}$',
                                                //'ErrorMessages' => array('required'=> '$translate->_("Ce champs est vide : vous devez le compléter")'),
                                                //'invalidMessage' => 'Invalid exercice10 name must be between 6 and 60 alphanumeric characters',
                                                'promptMessage'    => 'Enter your exercice10 answer',
                                                'id'            => 'exercice10_4-1',
                                                'class'            => 'static'
                                                    ),
                                                array()
                            );
                            
        $exercice10_subform4->addElement('validationTextBox', 'exercice10 4-2', array(
                                                'label'      => 'exercice10 name :',
                                                'required'   => true,
                                                'filters'    => array('StripTags',
                                                                    'StringTrim'),
                                                'regExp'         => '^[\sa-zA-Z0-9_-]{6,60}$',
                                                //'ErrorMessages' => array('required'=> '$translate->_("Ce champs est vide : vous devez le compléter")'),
                                                //'invalidMessage' => 'Invalid exercice10 name must be between 6 and 60 alphanumeric characters',
                                                'promptMessage'    => 'Enter your exercice10 answer',
                                                'id'            => 'exercice10_4-2',
                                                'class'            => 'static'
                                                    ),
                                                array()
                            );
                            
        $exercice10_subform4->addElement('validationTextBox', 'exercice10 4-3', array(
                                                'label'      => 'exercice10 name :',
                                                'required'   => true,
                                                'filters'    => array('StripTags',
                                                                    'StringTrim'),
                                                'regExp'         => '^[\sa-zA-Z0-9_-]{6,60}$',
                                                //'ErrorMessages' => array('required'=> '$translate->_("Ce champs est vide : vous devez le compléter")'),
                                                //'invalidMessage' => 'Invalid exercice10 name must be between 6 and 60 alphanumeric characters',
                                                'promptMessage'    => 'Enter your exercice10 answer',
                                                'id'            => 'exercice10_4-3',
                                                'class'            => 'static'
                                                    ),
                                                array()
                            );

        $exercice10_subform4->addElement('validationTextBox', 'exercice10 4-4', array(
                                                'label'      => 'exercice10 name :',
                                                'required'   => true,
                                                'filters'    => array('StripTags',
                                                                    'StringTrim'),
                                                'regExp'         => '^[\sa-zA-Z0-9_-]{6,60}$',
                                                //'ErrorMessages' => array('required'=> '$translate->_("Ce champs est vide : vous devez le compléter")'),
                                                //'invalidMessage' => 'Invalid exercice10 name must be between 6 and 60 alphanumeric characters',
                                                'promptMessage'    => 'Enter your exercice10 answer',
                                                'id'            => 'exercice10_4-4',
                                                'class'            => 'static'
                                                    ),
                                                array()
                            );

        $exercice10_subform4->addElement('validationTextBox', 'exercice10 4-5', array(
                                                'label'      => 'exercice10 name :',
                                                'required'   => true,
                                                'filters'    => array('StripTags',
                                                                    'StringTrim'),
                                                'regExp'         => '^[\sa-zA-Z0-9_-]{6,60}$',
                                                //'ErrorMessages' => array('required'=> '$translate->_("Ce champs est vide : vous devez le compléter")'),
                                                //'invalidMessage' => 'Invalid exercice10 name must be between 6 and 60 alphanumeric characters',
                                                'promptMessage'    => 'Enter your exercice10 answer',
                                                'id'            => 'exercice10_4-5',
                                                'class'            => 'static'
                                                    ),
                                                array()
                            );                            
                            
           // Add a Course answer element
        $exercice10_subform4->addElement('ComboBox', 'course_answer_4', array(
                                                'label'      => 'Answer :',
                                                'required'   => true,
                                                'value'        => 'original',
                                                'autocomplete' => true,
                                                'multiOptions' => array('1'    => '$translate->_("1")',
                                                                        '2'    => '$translate->_("2")',
                                                                        '3'    => '$translate->_("3")',
                                                                        '4'    => '$translate->_("4")',
                                                                        '5'    => '$translate->_("5")',),
                                                'ErrorMessages' => array('required'=>'Element requis'),
                                                'promptMessage'    => 'Enter answer',
                                                'id'            => 'course_answer_4',
                                                'class'            => 'static',
                                                'invalidMessage' => 'Invalid type',
                                                            )
                            );                            
                            
        //5th question :
        // Add a exercice10 name element
        $exercice10_subform5->addElement('validationTextBox', 'exercice10 5-1', array(
                                                'label'      => 'exercice10 name :',
                                                'required'   => true,
                                                'filters'    => array('StripTags',
                                                                    'StringTrim'),
                                                'regExp'         => '^[\sa-zA-Z0-9_-]{6,60}$',
                                                //'ErrorMessages' => array('required'=> '$translate->_("Ce champs est vide : vous devez le compléter")'),
                                                //'invalidMessage' => 'Invalid exercice10 name must be between 6 and 60 alphanumeric characters',
                                                'promptMessage'    => 'Enter your exercice10 answer',
                                                'id'            => 'exercice10_5-1',
                                                'class'            => 'static'
                                                    ),
                                                array()
                            );
                            
        $exercice10_subform5->addElement('validationTextBox', 'exercice10 5-2', array(
                                                'label'      => 'exercice10 name :',
                                                'required'   => true,
                                                'filters'    => array('StripTags',
                                                                    'StringTrim'),
                                                'regExp'         => '^[\sa-zA-Z0-9_-]{6,60}$',
                                                //'ErrorMessages' => array('required'=> '$translate->_("Ce champs est vide : vous devez le compléter")'),
                                                //'invalidMessage' => 'Invalid exercice10 name must be between 6 and 60 alphanumeric characters',
                                                'promptMessage'    => 'Enter your exercice10 answer',
                                                'id'            => 'exercice10_5-2',
                                                'class'            => 'static'
                                                    ),
                                                array()
                            );
                            
        $exercice10_subform5->addElement('validationTextBox', 'exercice10 5-3', array(
                                                'label'      => 'exercice10 name :',
                                                'required'   => true,
                                                'filters'    => array('StripTags',
                                                                    'StringTrim'),
                                                'regExp'         => '^[\sa-zA-Z0-9_-]{6,60}$',
                                                //'ErrorMessages' => array('required'=> '$translate->_("Ce champs est vide : vous devez le compléter")'),
                                                //'invalidMessage' => 'Invalid exercice10 name must be between 6 and 60 alphanumeric characters',
                                                'promptMessage'    => 'Enter your exercice10 answer',
                                                'id'            => 'exercice10_5-3',
                                                'class'            => 'static'
                                                    ),
                                                array()
                            );

        $exercice10_subform5->addElement('validationTextBox', 'exercice10 5-4', array(
                                                'label'      => 'exercice10 name :',
                                                'required'   => true,
                                                'filters'    => array('StripTags',
                                                                    'StringTrim'),
                                                'regExp'         => '^[\sa-zA-Z0-9_-]{6,60}$',
                                                //'ErrorMessages' => array('required'=> '$translate->_("Ce champs est vide : vous devez le compléter")'),
                                                //'invalidMessage' => 'Invalid exercice10 name must be between 6 and 60 alphanumeric characters',
                                                'promptMessage'    => 'Enter your exercice10 answer',
                                                'id'            => 'exercice10_5-4',
                                                'class'            => 'static'
                                                    ),
                                                array()
                            );

        $exercice10_subform5->addElement('validationTextBox', 'exercice10 5-5', array(
                                                'label'      => 'exercice10 name :',
                                                'required'   => true,
                                                'filters'    => array('StripTags',
                                                                    'StringTrim'),
                                                'regExp'         => '^[\sa-zA-Z0-9_-]{6,60}$',
                                                //'ErrorMessages' => array('required'=> '$translate->_("Ce champs est vide : vous devez le compléter")'),
                                                //'invalidMessage' => 'Invalid exercice10 name must be between 6 and 60 alphanumeric characters',
                                                'promptMessage'    => 'Enter your exercice10 answer',
                                                'id'            => 'exercice10_5-5',
                                                'class'            => 'static'
                                                    ),
                                                array()
                            );                            
                            
           // Add a Course answer element
        $exercice10_subform5->addElement('ComboBox', 'course_answer_5', array(
                                                'label'      => 'Answer :',
                                                'required'   => true,
                                                'value'        => 'original',
                                                'autocomplete' => true,
                                                'multiOptions' => array('1'    => '$translate->_("1")',
                                                                        '2'    => '$translate->_("2")',
                                                                        '3'    => '$translate->_("3")',
                                                                        '4'    => '$translate->_("4")',
                                                                        '5'    => '$translate->_("5")',),
                                                'ErrorMessages' => array('required'=>'Element requis'),
                                                'promptMessage'    => 'Enter answer',
                                                'id'            => 'course_answer_5',
                                                'class'            => 'static',
                                                'invalidMessage' => 'Invalid type',
                                                            )
                            );                            
        //6th question :
        // Add a exercice10 name element
        $exercice10_subform6->addElement('validationTextBox', 'exercice10 6-1', array(
                                                'label'      => 'exercice10 name :',
                                                'required'   => true,
                                                'filters'    => array('StripTags',
                                                                    'StringTrim'),
                                                'regExp'         => '^[\sa-zA-Z0-9_-]{6,60}$',
                                                //'ErrorMessages' => array('required'=> '$translate->_("Ce champs est vide : vous devez le compléter")'),
                                                //'invalidMessage' => 'Invalid exercice10 name must be between 6 and 60 alphanumeric characters',
                                                'promptMessage'    => 'Enter your exercice10 answer',
                                                'id'            => 'exercice10_6-1',
                                                'class'            => 'static'
                                                    ),
                                                array()
                            );
                            
        $exercice10_subform6->addElement('validationTextBox', 'exercice10 6-2', array(
                                                'label'      => 'exercice10 name :',
                                                'required'   => true,
                                                'filters'    => array('StripTags',
                                                                    'StringTrim'),
                                                'regExp'         => '^[\sa-zA-Z0-9_-]{6,60}$',
                                                //'ErrorMessages' => array('required'=> '$translate->_("Ce champs est vide : vous devez le compléter")'),
                                                //'invalidMessage' => 'Invalid exercice10 name must be between 6 and 60 alphanumeric characters',
                                                'promptMessage'    => 'Enter your exercice10 answer',
                                                'id'            => 'exercice10_6-2',
                                                'class'            => 'static'
                                                    ),
                                                array()
                            );
                            
        $exercice10_subform6->addElement('validationTextBox', 'exercice10 6-3', array(
                                                'label'      => 'exercice10 name :',
                                                'required'   => true,
                                                'filters'    => array('StripTags',
                                                                    'StringTrim'),
                                                'regExp'         => '^[\sa-zA-Z0-9_-]{6,60}$',
                                                //'ErrorMessages' => array('required'=> '$translate->_("Ce champs est vide : vous devez le compléter")'),
                                                //'invalidMessage' => 'Invalid exercice10 name must be between 6 and 60 alphanumeric characters',
                                                'promptMessage'    => 'Enter your exercice10 answer',
                                                'id'            => 'exercice10_6-3',
                                                'class'            => 'static'
                                                    ),
                                                array()
                            );

        $exercice10_subform6->addElement('validationTextBox', 'exercice10 6-4', array(
                                                'label'      => 'exercice10 name :',
                                                'required'   => true,
                                                'filters'    => array('StripTags',
                                                                    'StringTrim'),
                                                'regExp'         => '^[\sa-zA-Z0-9_-]{6,60}$',
                                                //'ErrorMessages' => array('required'=> '$translate->_("Ce champs est vide : vous devez le compléter")'),
                                                //'invalidMessage' => 'Invalid exercice10 name must be between 6 and 60 alphanumeric characters',
                                                'promptMessage'    => 'Enter your exercice10 answer',
                                                'id'            => 'exercice10_6-4',
                                                'class'            => 'static'
                                                    ),
                                                array()
                            );

        $exercice10_subform6->addElement('validationTextBox', 'exercice10 6-5', array(
                                                'label'      => 'exercice10 name :',
                                                'required'   => true,
                                                'filters'    => array('StripTags',
                                                                    'StringTrim'),
                                                'regExp'         => '^[\sa-zA-Z0-9_-]{6,60}$',
                                                //'ErrorMessages' => array('required'=> '$translate->_("Ce champs est vide : vous devez le compléter")'),
                                                //'invalidMessage' => 'Invalid exercice10 name must be between 6 and 60 alphanumeric characters',
                                                'promptMessage'    => 'Enter your exercice10 answer',
                                                'id'            => 'exercice10_6-5',
                                                'class'            => 'static'
                                                    ),
                                                array()
                            );                            
                            
           // Add a Course answer element
        $exercice10_subform6->addElement('ComboBox', 'course_answer_6', array(
                                                'label'      => 'Answer :',
                                                'required'   => true,
                                                'value'        => 'original',
                                                'autocomplete' => true,
                                                'multiOptions' => array('1'    => '$translate->_("1")',
                                                                        '2'    => '$translate->_("2")',
                                                                        '3'    => '$translate->_("3")',
                                                                        '4'    => '$translate->_("4")',
                                                                        '5'    => '$translate->_("5")',),
                                                'ErrorMessages' => array('required'=>'Element requis'),
                                                'promptMessage'    => 'Enter answer',
                                                'id'            => 'course_answer_6',
                                                'class'            => 'static',
                                                'invalidMessage' => 'Invalid type',
                                                            )
                            );                            
                            
        //First question :
        // Add a exercice10 name element
        $exercice10_subform7->addElement('validationTextBox', 'exercice10 7-1', array(
                                                'label'      => 'exercice10 name :',
                                                'required'   => true,
                                                'filters'    => array('StripTags',
                                                                    'StringTrim'),
                                                'regExp'         => '^[\sa-zA-Z0-9_-]{6,60}$',
                                                //'ErrorMessages' => array('required'=> '$translate->_("Ce champs est vide : vous devez le compléter")'),
                                                //'invalidMessage' => 'Invalid exercice10 name must be between 6 and 60 alphanumeric characters',
                                                'promptMessage'    => 'Enter your exercice10 answer',
                                                'id'            => 'exercice10_7-1',
                                                'class'            => 'static'
                                                    ),
                                                array()
                            );
                            
        $exercice10_subform7->addElement('validationTextBox', 'exercice10 7-2', array(
                                                'label'      => 'exercice10 name :',
                                                'required'   => true,
                                                'filters'    => array('StripTags',
                                                                    'StringTrim'),
                                                'regExp'         => '^[\sa-zA-Z0-9_-]{6,60}$',
                                                //'ErrorMessages' => array('required'=> '$translate->_("Ce champs est vide : vous devez le compléter")'),
                                                //'invalidMessage' => 'Invalid exercice10 name must be between 6 and 60 alphanumeric characters',
                                                'promptMessage'    => 'Enter your exercice10 answer',
                                                'id'            => 'exercice10_7-2',
                                                'class'            => 'static'
                                                    ),
                                                array()
                            );
                            
        $exercice10_subform7->addElement('validationTextBox', 'exercice10 7-3', array(
                                                'label'      => 'exercice10 name :',
                                                'required'   => true,
                                                'filters'    => array('StripTags',
                                                                    'StringTrim'),
                                                'regExp'         => '^[\sa-zA-Z0-9_-]{6,60}$',
                                                //'ErrorMessages' => array('required'=> '$translate->_("Ce champs est vide : vous devez le compléter")'),
                                                //'invalidMessage' => 'Invalid exercice10 name must be between 6 and 60 alphanumeric characters',
                                                'promptMessage'    => 'Enter your exercice10 answer',
                                                'id'            => 'exercice10_7-3',
                                                'class'            => 'static'
                                                    ),
                                                array()
                            );

        $exercice10_subform7->addElement('validationTextBox', 'exercice10 7-4', array(
                                                'label'      => 'exercice10 name :',
                                                'required'   => true,
                                                'filters'    => array('StripTags',
                                                                    'StringTrim'),
                                                'regExp'         => '^[\sa-zA-Z0-9_-]{6,60}$',
                                                //'ErrorMessages' => array('required'=> '$translate->_("Ce champs est vide : vous devez le compléter")'),
                                                //'invalidMessage' => 'Invalid exercice10 name must be between 6 and 60 alphanumeric characters',
                                                'promptMessage'    => 'Enter your exercice10 answer',
                                                'id'            => 'exercice10_7-4',
                                                'class'            => 'static'
                                                    ),
                                                array()
                            );

        $exercice10_subform7->addElement('validationTextBox', 'exercice10 7-5', array(
                                                'label'      => 'exercice10 name :',
                                                'required'   => true,
                                                'filters'    => array('StripTags',
                                                                    'StringTrim'),
                                                'regExp'         => '^[\sa-zA-Z0-9_-]{6,60}$',
                                                //'ErrorMessages' => array('required'=> '$translate->_("Ce champs est vide : vous devez le compléter")'),
                                                //'invalidMessage' => 'Invalid exercice10 name must be between 6 and 60 alphanumeric characters',
                                                'promptMessage'    => 'Enter your exercice10 answer',
                                                'id'            => 'exercice10_7-5',
                                                'class'            => 'static'
                                                    ),
                                                array()
                            );

           // Add a Course answer element
        $exercice10_subform7->addElement('ComboBox', 'course_answer_7', array(
                                                'label'      => 'Answer :',
                                                'required'   => true,
                                                'value'        => 'original',
                                                'autocomplete' => true,
                                                'multiOptions' => array('1'    => '$translate->_("1")',
                                                                        '2'    => '$translate->_("2")',
                                                                        '3'    => '$translate->_("3")',
                                                                        '4'    => '$translate->_("4")',
                                                                        '5'    => '$translate->_("5")',),
                                                'ErrorMessages' => array('required'=>'Element requis'),
                                                'promptMessage'    => 'Enter answer',
                                                'id'            => 'course_answer_7',
                                                'class'            => 'static',
                                                'invalidMessage' => 'Invalid type',
                                                            )
                            );                            
                            
        //First question :
        // Add a exercice10 name element
        $exercice10_subform8->addElement('validationTextBox', 'exercice10 8-1', array(
                                                'label'      => 'exercice10 name :',
                                                'required'   => true,
                                                'filters'    => array('StripTags',
                                                                    'StringTrim'),
                                                'regExp'         => '^[\sa-zA-Z0-9_-]{6,60}$',
                                                //'ErrorMessages' => array('required'=> '$translate->_("Ce champs est vide : vous devez le compléter")'),
                                                //'invalidMessage' => 'Invalid exercice10 name must be between 6 and 60 alphanumeric characters',
                                                'promptMessage'    => 'Enter your exercice10 answer',
                                                'id'            => 'exercice10_8-1',
                                                'class'            => 'static'
                                                    ),
                                                array()
                            );
                            
        $exercice10_subform8->addElement('validationTextBox', 'exercice10 8-2', array(
                                                'label'      => 'exercice10 name :',
                                                'required'   => true,
                                                'filters'    => array('StripTags',
                                                                    'StringTrim'),
                                                'regExp'         => '^[\sa-zA-Z0-9_-]{6,60}$',
                                                //'ErrorMessages' => array('required'=> '$translate->_("Ce champs est vide : vous devez le compléter")'),
                                                //'invalidMessage' => 'Invalid exercice10 name must be between 6 and 60 alphanumeric characters',
                                                'promptMessage'    => 'Enter your exercice10 answer',
                                                'id'            => 'exercice10_8-2',
                                                'class'            => 'static'
                                                    ),
                                                array()
                            );
                            
        $exercice10_subform8->addElement('validationTextBox', 'exercice10 8-3', array(
                                                'label'      => 'exercice10 name :',
                                                'required'   => true,
                                                'filters'    => array('StripTags',
                                                                    'StringTrim'),
                                                'regExp'         => '^[\sa-zA-Z0-9_-]{6,60}$',
                                                //'ErrorMessages' => array('required'=> '$translate->_("Ce champs est vide : vous devez le compléter")'),
                                                //'invalidMessage' => 'Invalid exercice10 name must be between 6 and 60 alphanumeric characters',
                                                'promptMessage'    => 'Enter your exercice10 answer',
                                                'id'            => 'exercice10_8-3',
                                                'class'            => 'static'
                                                    ),
                                                array()
                            );

        $exercice10_subform8->addElement('validationTextBox', 'exercice10 8-4', array(
                                                'label'      => 'exercice10 name :',
                                                'required'   => true,
                                                'filters'    => array('StripTags',
                                                                    'StringTrim'),
                                                'regExp'         => '^[\sa-zA-Z0-9_-]{6,60}$',
                                                //'ErrorMessages' => array('required'=> '$translate->_("Ce champs est vide : vous devez le compléter")'),
                                                //'invalidMessage' => 'Invalid exercice10 name must be between 6 and 60 alphanumeric characters',
                                                'promptMessage'    => 'Enter your exercice10 answer',
                                                'id'            => 'exercice10_8-4',
                                                'class'            => 'static'
                                                    ),
                                                array()
                            );

        $exercice10_subform8->addElement('validationTextBox', 'exercice10 8-5', array(
                                                'label'      => 'exercice10 name :',
                                                'required'   => true,
                                                'filters'    => array('StripTags',
                                                                    'StringTrim'),
                                                'regExp'         => '^[\sa-zA-Z0-9_-]{6,60}$',
                                                //'ErrorMessages' => array('required'=> '$translate->_("Ce champs est vide : vous devez le compléter")'),
                                                //'invalidMessage' => 'Invalid exercice10 name must be between 6 and 60 alphanumeric characters',
                                                'promptMessage'    => 'Enter your exercice10 answer',
                                                'id'            => 'exercice10_8-5',
                                                'class'            => 'static'
                                                    ),
                                                array()
                            );                            
                            
           // Add a Course answer element
        $exercice10_subform8->addElement('ComboBox', 'course_answer_8', array(
                                                'label'      => 'Answer :',
                                                'required'   => true,
                                                'value'        => 'original',
                                                'autocomplete' => true,
                                                'multiOptions' => array('1'    => '$translate->_("1")',
                                                                        '2'    => '$translate->_("2")',
                                                                        '3'    => '$translate->_("3")',
                                                                        '4'    => '$translate->_("4")',
                                                                        '5'    => '$translate->_("5")',),
                                                'ErrorMessages' => array('required'=>'Element requis'),
                                                'promptMessage'    => 'Enter answer',
                                                'id'            => 'course_answer_8',
                                                'class'            => 'static',
                                                'invalidMessage' => 'Invalid type',
                                                            )
                            );                            
        //First question :
        // Add a exercice10 name element
        $exercice10_subform9->addElement('validationTextBox', 'exercice10 9-1', array(
                                                'label'      => 'exercice10 name :',
                                                'required'   => true,
                                                'filters'    => array('StripTags',
                                                                    'StringTrim'),
                                                'regExp'         => '^[\sa-zA-Z0-9_-]{6,60}$',
                                                //'ErrorMessages' => array('required'=> '$translate->_("Ce champs est vide : vous devez le compléter")'),
                                                //'invalidMessage' => 'Invalid exercice10 name must be between 6 and 60 alphanumeric characters',
                                                'promptMessage'    => 'Enter your exercice10 answer',
                                                'id'            => 'exercice10_9-1',
                                                'class'            => 'static'
                                                    ),
                                                array()
                            );
                            
        $exercice10_subform9->addElement('validationTextBox', 'exercice10 9-2', array(
                                                'label'      => 'exercice10 name :',
                                                'required'   => true,
                                                'filters'    => array('StripTags',
                                                                    'StringTrim'),
                                                'regExp'         => '^[\sa-zA-Z0-9_-]{6,60}$',
                                                //'ErrorMessages' => array('required'=> '$translate->_("Ce champs est vide : vous devez le compléter")'),
                                                //'invalidMessage' => 'Invalid exercice10 name must be between 6 and 60 alphanumeric characters',
                                                'promptMessage'    => 'Enter your exercice10 answer',
                                                'id'            => 'exercice10_9-2',
                                                'class'            => 'static'
                                                    ),
                                                array()
                            );
                            
        $exercice10_subform9->addElement('validationTextBox', 'exercice10 9-3', array(
                                                'label'      => 'exercice10 name :',
                                                'required'   => true,
                                                'filters'    => array('StripTags',
                                                                    'StringTrim'),
                                                'regExp'         => '^[\sa-zA-Z0-9_-]{6,60}$',
                                                //'ErrorMessages' => array('required'=> '$translate->_("Ce champs est vide : vous devez le compléter")'),
                                                //'invalidMessage' => 'Invalid exercice10 name must be between 6 and 60 alphanumeric characters',
                                                'promptMessage'    => 'Enter your exercice10 answer',
                                                'id'            => 'exercice10_9-3',
                                                'class'            => 'static'
                                                    ),
                                                array()
                            );

        $exercice10_subform9->addElement('validationTextBox', 'exercice10 9-4', array(
                                                'label'      => 'exercice10 name :',
                                                'required'   => true,
                                                'filters'    => array('StripTags',
                                                                    'StringTrim'),
                                                'regExp'         => '^[\sa-zA-Z0-9_-]{6,60}$',
                                                //'ErrorMessages' => array('required'=> '$translate->_("Ce champs est vide : vous devez le compléter")'),
                                                //'invalidMessage' => 'Invalid exercice10 name must be between 6 and 60 alphanumeric characters',
                                                'promptMessage'    => 'Enter your exercice10 answer',
                                                'id'            => 'exercice10_9-4',
                                                'class'            => 'static'
                                                    ),
                                                array()
                            );

        $exercice10_subform9->addElement('validationTextBox', 'exercice10 9-5', array(
                                                'label'      => 'exercice10 name :',
                                                'required'   => true,
                                                'filters'    => array('StripTags',
                                                                    'StringTrim'),
                                                'regExp'         => '^[\sa-zA-Z0-9_-]{6,60}$',
                                                //'ErrorMessages' => array('required'=> '$translate->_("Ce champs est vide : vous devez le compléter")'),
                                                //'invalidMessage' => 'Invalid exercice10 name must be between 6 and 60 alphanumeric characters',
                                                'promptMessage'    => 'Enter your exercice10 answer',
                                                'id'            => 'exercice10_9-5',
                                                'class'            => 'static'
                                                    ),
                                                array()
                            );                            
                            
           // Add a Course answer element
        $exercice10_subform9->addElement('ComboBox', 'course_answer_9', array(
                                                'label'      => 'Answer :',
                                                'required'   => true,
                                                'value'        => 'original',
                                                'autocomplete' => true,
                                                'multiOptions' => array('1'    => '$translate->_("1")',
                                                                        '2'    => '$translate->_("2")',
                                                                        '3'    => '$translate->_("3")',
                                                                        '4'    => '$translate->_("4")',
                                                                        '5'    => '$translate->_("5")',),
                                                'ErrorMessages' => array('required'=>'Element requis'),
                                                'promptMessage'    => 'Enter answer',
                                                'id'            => 'course_answer_9',
                                                'class'            => 'static',
                                                'invalidMessage' => 'Invalid type',
                                                            )
                            );                            
        //First question :
        // Add a exercice10 name element
        $exercice10_subform10->addElement('validationTextBox', 'exercice10 10-1', array(
                                                'label'      => 'exercice10 name :',
                                                'required'   => true,
                                                'filters'    => array('StripTags',
                                                                    'StringTrim'),
                                                'regExp'         => '^[\sa-zA-Z0-9_-]{6,60}$',
                                                //'ErrorMessages' => array('required'=> '$translate->_("Ce champs est vide : vous devez le compléter")'),
                                                //'invalidMessage' => 'Invalid exercice10 name must be between 6 and 60 alphanumeric characters',
                                                'promptMessage'    => 'Enter your exercice10 answer',
                                                'id'            => 'exercice10_10-1',
                                                'class'            => 'static'
                                                    ),
                                                array()
                            );
                            
        $exercice10_subform10->addElement('validationTextBox', 'exercice10 10-2', array(
                                                'label'      => 'exercice10 name :',
                                                'required'   => true,
                                                'filters'    => array('StripTags',
                                                                    'StringTrim'),
                                                'regExp'         => '^[\sa-zA-Z0-9_-]{6,60}$',
                                                //'ErrorMessages' => array('required'=> '$translate->_("Ce champs est vide : vous devez le compléter")'),
                                                //'invalidMessage' => 'Invalid exercice10 name must be between 6 and 60 alphanumeric characters',
                                                'promptMessage'    => 'Enter your exercice10 answer',
                                                'id'            => 'exercice10_10-2',
                                                'class'            => 'static'
                                                    ),
                                                array()
                            );
                            
        $exercice10_subform10->addElement('validationTextBox', 'exercice10 10-3', array(
                                                'label'      => 'exercice10 name :',
                                                'required'   => true,
                                                'filters'    => array('StripTags',
                                                                    'StringTrim'),
                                                'regExp'         => '^[\sa-zA-Z0-9_-]{6,60}$',
                                                //'ErrorMessages' => array('required'=> '$translate->_("Ce champs est vide : vous devez le compléter")'),
                                                //'invalidMessage' => 'Invalid exercice10 name must be between 6 and 60 alphanumeric characters',
                                                'promptMessage'    => 'Enter your exercice10 answer',
                                                'id'            => 'exercice10_10-3',
                                                'class'            => 'static'
                                                    ),
                                                array()
                            );

        $exercice10_subform10->addElement('validationTextBox', 'exercice10 10-4', array(
                                                'label'      => 'exercice10 name :',
                                                'required'   => true,
                                                'filters'    => array('StripTags',
                                                                    'StringTrim'),
                                                'regExp'         => '^[\sa-zA-Z0-9_-]{6,60}$',
                                                //'ErrorMessages' => array('required'=> '$translate->_("Ce champs est vide : vous devez le compléter")'),
                                                //'invalidMessage' => 'Invalid exercice10 name must be between 6 and 60 alphanumeric characters',
                                                'promptMessage'    => 'Enter your exercice10 answer',
                                                'id'            => 'exercice10_10-4',
                                                'class'            => 'static'
                                                    ),
                                                array()
                            );

        $exercice10_subform10->addElement('validationTextBox', 'exercice10 10-5', array(
                                                'label'      => 'exercice10 name :',
                                                'required'   => true,
                                                'filters'    => array('StripTags',
                                                                    'StringTrim'),
                                                'regExp'         => '^[\sa-zA-Z0-9_-]{6,60}$',
                                                //'ErrorMessages' => array('required'=> '$translate->_("Ce champs est vide : vous devez le compléter")'),
                                                //'invalidMessage' => 'Invalid exercice10 name must be between 6 and 60 alphanumeric characters',
                                                'promptMessage'    => 'Enter your exercice10 answer',
                                                'id'            => 'exercice10_10-5',
                                                'class'            => 'static'
                                                    ),
                                                array()
                            );                            
                            
           // Add a Course answer element
        $exercice10_subform10->addElement('ComboBox', 'course_answer_10', array(
                                                'label'      => 'Answer :',
                                                'required'   => true,
                                                'value'        => 'original',
                                                'autocomplete' => true,
                                                'multiOptions' => array('1'    => '$translate->_("1")',
                                                                        '2'    => '$translate->_("2")',
                                                                        '3'    => '$translate->_("3")',
                                                                        '4'    => '$translate->_("4")',
                                                                        '5'    => '$translate->_("5")',),
                                                'ErrorMessages' => array('required'=>'Element requis'),
                                                'promptMessage'    => 'Enter answer',
                                                'id'            => 'course_answer_10',
                                                'class'            => 'static',
                                                'invalidMessage' => 'Invalid type',
                                                            )
                            );                            

/*#######################################*/                       
/*###### Here comes the decorators ######*/
/*#######################################*/
         
                              
        /*Set form Decorators*/
        $this->setDecorators(array(
                                    array('FormElements'),
                                     array('HtmlTag', array('tag' => 'div','class' => 'static', 'class' => 'thundra')),
                                      array('DijitForm')
                                      )
                            );                                            
                                                                    
        /*Set form commons elements Decorators*/                                                
        $this->setElementDecorators(array(
                                        array('ViewHelper', 'Description',
        'Errors',),
                                         ),
                                     null,
                                     null
                                 );
                            
        /*Set subform Decorators*/     
        $this->setSubFormDecorators(array(
                                            array('FormElements')
                                      )
                                   );

                                   
        /*Add Specific Subgroup Decorators*/
        $this->getSubForm('exercice10_subform1')->addDecorators(array(
                                                                        array('Fieldset', array('class' => 'static',
                                                                                                'legend' => 'course')
                                                                         )
                                                                    ));    
        $this->getSubForm('exercice10_subform2')->addDecorators(array(
                                                                        array('Fieldset', array('class' => 'static',
                                                                                                'legend' => 'course')
                                                                         )
                                                                    ));    
        $this->getSubForm('exercice10_subform3')->addDecorators(array(
                                                                        array('Fieldset', array('class' => 'static',
                                                                                                'legend' => 'course')
                                                                         )
                                                                    ));    
        $this->getSubForm('exercice10_subform4')->addDecorators(array(
                                                                        array('Fieldset', array('class' => 'static',
                                                                                                'legend' => 'course')
                                                                         )
                                                                    ));
        $this->getSubForm('exercice10_subform5')->addDecorators(array(
                                                                        array('Fieldset', array('class' => 'static',
                                                                                                'legend' => 'course')
                                                                         )
                                                                    ));    
        $this->getSubForm('exercice10_subform6')->addDecorators(array(
                                                                        array('Fieldset', array('class' => 'static',
                                                                                                'legend' => 'course')
                                                                         )
                                                                    ));
        $this->getSubForm('exercice10_subform7')->addDecorators(array(
                                                                        array('Fieldset', array('class' => 'static',
                                                                                                'legend' => 'course')
                                                                         )
                                                                    ));    
        $this->getSubForm('exercice10_subform8')->addDecorators(array(
                                                                        array('Fieldset', array('class' => 'static',
                                                                                                'legend' => 'course')
                                                                         )
                                                                    ));    
        $this->getSubForm('exercice10_subform9')->addDecorators(array(
                                                                        array('Fieldset', array('class' => 'static',
                                                                                                'legend' => 'course')
                                                                         )
                                                                    ));    
        $this->getSubForm('exercice10_subform10')->addDecorators(array(
                                                                        array('Fieldset', array('class' => 'static',
                                                                                                'legend' => 'course')
                                                                         )
                                                                    ));    
    
    
    
    
    
    
    
    
    
    
        
    }
}
?>

Dernière modification par daverck (23-04-2014 06:21:21)

Hors ligne

 

#2 21-04-2014 08:25:56

tdutrion
Administrateur
Lieu: Dijon, Paris, Edinburgh
Date d'inscription: 23-12-2009
Messages: 613
Site web

Re: [Résolu][Zend_Form][1.12.6] gros problème avec les decorators

Bonjour,

Je peux me tromper mais le message d'erreur laisse à penser que le problème se trouve au niveau de la vue, pas de la création du formulaire...

Hors ligne

 

#3 21-04-2014 16:29:31

daverck
Membre
Date d'inscription: 14-09-2009
Messages: 30

Re: [Résolu][Zend_Form][1.12.6] gros problème avec les decorators

La vue est ce qui a de plus simple :

Code:

[lang=php]<?php 
echo $this->form10;

?>

Dernière modification par daverck (21-04-2014 16:35:17)

Hors ligne

 

#4 21-04-2014 18:26:27

daverck
Membre
Date d'inscription: 14-09-2009
Messages: 30

Re: [Résolu][Zend_Form][1.12.6] gros problème avec les decorators

çà devrait être si simple pourtant hmm

J'ai vérifié : mon dojo toolkit est à jour.

Hors ligne

 

#5 22-04-2014 17:02:09

daverck
Membre
Date d'inscription: 14-09-2009
Messages: 30

Re: [Résolu][Zend_Form][1.12.6] gros problème avec les decorators

Je pense que l'initialisation de la vue est correcte aussi parce que j'ai d'autre formulaires qui miraculeusement fonctionnent avec dojo :

Code:

[lang=php]    protected function _initView()
    {
        $view = new Zend_View();
        $view->addHelperPath('Zend/Dojo/View/Helper/', 'Zend_Dojo_View_Helper');
        $view->doctype('XHTML1_TRANSITIONAL');
        
        $frontController = Zend_Controller_Front::getInstance();
        $frontController->setBaseUrl(dirname($_SERVER['SCRIPT_NAME']));
        
        $view->dojo()//path to dojo
                    // before setting home to 127.0.0.15 there was this code 
                    //->setLocalPath(Zend_Controller_Front::getInstance()->getBaseUrl() . '/js/dojo/dojo/dojo.js')
                    ->setLocalPath('/js/dojo/dojo/dojo.js')
                    //dojo config option
                    ->setDjConfigOption('usePlainJson', true)
                    ->setDjConfigOption('debug', true)
                    ->setDjConfigOption('parseOnLoad', true)
                    //enable only when necessary
                    ->disable();
                    
        Zend_Dojo_View_Helper_Dojo::setUseProgrammatic();
        Zend_Dojo::enableView($view);
        
        Zend_Controller_Action_HelperBroker::getStaticHelper('viewRenderer')->setView($view);
    }

Hors ligne

 

#6 22-04-2014 17:33:20

daverck
Membre
Date d'inscription: 14-09-2009
Messages: 30

Re: [Résolu][Zend_Form][1.12.6] gros problème avec les decorators

en fait l'erreur provient bien d'un autre formulaire que j'instanciais dans le controller  (erreur que je n'explique pas non plus). maintenant j'ai juste une "page blanche" => tout le layout est rendu mais je n'ai pas de formulaire dans le DOM.

Hors ligne

 

#7 22-04-2014 18:03:56

daverck
Membre
Date d'inscription: 14-09-2009
Messages: 30

Re: [Résolu][Zend_Form][1.12.6] gros problème avec les decorators

Je constate maintenant que si je remplace dans un autre controller un formulaire qui fonctionne avec mon formulaire problématique ce dernier s'affiche. !?

Hors ligne

 

#8 23-04-2014 06:19:59

daverck
Membre
Date d'inscription: 14-09-2009
Messages: 30

Re: [Résolu][Zend_Form][1.12.6] gros problème avec les decorators

Résolu grace a

Code:

<?php echo $this->form->render(); ?>

dans la vue et 

Code:

 $this->view->assign('form', $form);

dans le controller.

Hors ligne

 

Pied de page des forums

Propulsé par PunBB
© Copyright 2002–2005 Rickard Andersson
Traduction par punbb.fr

Graphisme réalisé par l'agence Rodolphe Eveilleau
Développement par Kitpages