IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

Zend_Form PHP Discussion :

Zend Form Table ajouter <th>


Sujet :

Zend_Form PHP

  1. #1
    Nouveau membre du Club
    Inscrit en
    Janvier 2010
    Messages
    43
    Détails du profil
    Informations forums :
    Inscription : Janvier 2010
    Messages : 43
    Points : 27
    Points
    27
    Par défaut Zend Form Table ajouter <th>
    Bonjour à tous,
    Je suis confronté à un petit soucis de mise en forme d'un formulaire. J'ai eu beau chercher durant des heures, rien trouvé.

    Dans mon form, j'ai, entre autres, un tableau tel que sur la pièce jointe. J'arrive à l'afficher sauf les th "standard" et "advance". Je ne vois vraiment pas comment m'y prendre. Voici le code de mon formulaire :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
    114
    115
    116
    117
    118
    119
    120
    121
    122
    123
    124
    125
    126
    127
    128
    129
    130
    131
    132
    133
    134
    135
    136
    137
    138
    139
    140
    141
    142
    143
    144
    145
    146
    147
    148
    149
    150
    151
    152
    153
    154
    155
    156
    157
    158
    159
    160
    161
    162
    163
    164
    165
    166
    167
    168
    169
    170
    171
    172
    173
    174
    175
    176
    177
    178
    179
    180
    181
    182
    183
    184
    185
    186
    187
    188
    189
    190
    191
    192
    193
    194
    195
    196
    197
    198
    199
    200
    201
    202
    203
    204
    205
    206
    207
    208
    209
    210
    211
    212
    213
    214
    215
    216
    217
    218
    219
    220
    221
    222
     
    <?php
     
    class Admin_Form_OfferTemplate extends Zend_Form{
     
        public function init(){
            $this->setName("ot_form_admin")
    	     ->setMethod('post');
     
    	/////////////////////////////////////////////////////////////////////////
     
    	$this->addElement('text', 'scope', array(
    	    'label'	     => 'Scope : '
            ));
     
    	$this->addElement('textarea', 'header_line_1', array(
    	    'label'	     => 'Header Line 1 : ',
    	    'cols'	     => 30,
    	    'rows'	     => 5
            ));
     
    	$this->addElement('textarea', 'footer_line_1', array(
    	    'label'	     => 'Footer Line 1 : ',
    	    'cols'	     => 30,
    	    'rows'	     => 5
            ));
     
     
    	$this->addElement('textarea', 'footer_line_3', array(
    	    'label'	     => 'Footer Line 3 : ',
    	    'cols'	     => 30,
    	    'rows'	     => 5
            ));
     
    	$this->addElement('textarea', 'footer_line_5', array(
    	    'label'	     => 'Footer Line 5 : ',
    	    'cols'	     => 30,
    	    'rows'	     => 5
            ));
     
    	$this->addDisplayGroup(
    	    array(
    		'scope',
    		'header_line_1',
    		'footer_line_1',
    		'footer_line_3',
    		'footer_line_4',
    		'footer_line_5',
    	    ),
    	    'span1',
    	    array(
    		'decorators' => array(
    		    'FormElements',
    		    array('HtmlTag', array('tag' => 'div', 'class' => 'span1')),
    		)
    	    )
    	);
     
    	/////////////////////////////////////////////////////////////////////////
     
    	$this->addElement('textarea', 'header_line_2', array(
    	    'label'	     => 'Header Line 2 : ',
    	    'cols'	     => 30,
    	    'rows'	     => 5
            ));
     
    	$this->addElement('textarea', 'footer_line_2', array(
    	    'label'	     => 'Footer Line 2 : ',
    	    'cols'	     => 30,
    	    'rows'	     => 5
            ));
     
    	$this->addElement('textarea', 'footer_line_4', array(
    	    'label'	     => 'Footer Line 4 : ',
    	    'cols'	     => 30,
    	    'rows'	     => 5
            ));
     
    	$this->addElement('textarea', 'footer_line_6', array(
    	    'label'	     => 'Footer Line 6 : ',
    	    'cols'	     => 30,
    	    'rows'	     => 5
            ));
     
    	$this->addDisplayGroup(
    	    array(
    		'header_line_2',
    		'footer_line_2',
    		'footer_line_4',
    		'footer_line_6'
    	    ),
    	    'span2',
    	    array(
    		'decorators' => array(
    		    'FormElements',
    		    array('HtmlTag', array('tag' => 'div', 'class' => 'span2')),
    		)
    	    )
    	);
     
    	/////////////////////////////////////////////////////////////////////////
     
    	$this->addElement('text', 'price_open_training_standart', array(
    	    'label'	 => 'Public / Open Training',
    	    'decorators' => array(
    		'ViewHelper', array(
    		    array('td' => 'HtmlTag'), array('tag' => 'td')
    		),
    		array('Label', array('tag' => 'td')),
    		array(array('row' => 'HtmlTag'), array('tag' => 'tr', 'openOnly' => 'true')),
    		array('Description', array('tag' => 'th', 'requiredSuffix' => ' *')),
    	    )
            ));
     
    	$this->addElement('text', 'price_open_training_advance', array(
    	    'decorators' => array(
    		'ViewHelper',
    		array(array('td' => 'HtmlTag'), array('tag' => 'td')),
    		array(array('row' => 'HtmlTag'), array('tag' => 'tr', 'closeOnly' => 'true'))
    	    )
            ));
     
    	$this->addElement('text', 'price_dedicated_class_on_customer_site_standart', array(
    	    'label'	 => 'On site dedicated class',
    	    'decorators' => array(
    		'ViewHelper',
    		array(array('td' => 'HtmlTag'), array('tag' => 'td')),
    		array('Label', array('tag' => 'td')),
    		array(array('row' => 'HtmlTag'), array('tag' => 'tr', 'openOnly' => 'true'))
    	    )
            ));
     
    	$this->addElement('text', 'price_dedicated_class_on_customer_site_advance', array(
    	    'decorators' => array(
    		'ViewHelper',
    		array(array('td' => 'HtmlTag'), array('tag' => 'td')),
    		array(array('row' => 'HtmlTag'), array('tag' => 'tr', 'closeOnly' => 'true'))
    	    )
            ));
     
    	$this->addElement('text', 'price_virtual_learning_standart', array(
    	    'label'	 => 'Virtual Learning',
    	    'decorators' => array(
    		'ViewHelper',
    		array(array('td' => 'HtmlTag'), array('tag' => 'td')),
    		array('Label', array('tag' => 'td')),
    		array(array('row' => 'HtmlTag'), array('tag' => 'tr', 'openOnly' => 'true'))
    	    )
            ));
     
    	$this->addElement('text', 'price_virtual_learning_advance', array(
    	    'decorators' => array(
    		'ViewHelper',
    		array(array('td' => 'HtmlTag'), array('tag' => 'td')),
    		array(array('row' => 'HtmlTag'), array('tag' => 'tr', 'closeOnly' => 'true'))
    	    )
            ));
     
    	$this->addElement('text', 'price_self_paced_training_standart', array(
    	    'label'	 => 'Self Paced Training',
    	    'decorators' => array(
    		'ViewHelper',
    		array(array('td' => 'HtmlTag'), array('tag' => 'td')),
    		array('Label', array('tag' => 'td')),
    		array(array('row' => 'HtmlTag'), array('tag' => 'tr', 'openOnly' => 'true'))
    	    )
            ));
     
    	$this->addElement('text', 'price_self_paced_training_advance', array(
    	    'decorators' => array(
    		'ViewHelper',
    		array(array('td' => 'HtmlTag'), array('tag' => 'td')),
    		array(array('row' => 'HtmlTag'), array('tag' => 'tr', 'closeOnly' => 'true'))
    	    )
            ));
     
    	$this->addElement('text', 'price_cost_travel', array(
    	    'label'	 => 'Travel Price',
    	    'decorators' => array(
    		'ViewHelper',
    		array(array('td' => 'HtmlTag'), array('tag' => 'td')),
    		array('Label', array('tag' => 'td')),
    		array(array('tr' => 'HtmlTag'), array('tag' => 'tr'))
    	    )
            ));
     
    	$this->addElement('submit', 'submit_ot', array(
                'required'   => false,
                'ignore'     => true,
                'label'      => 'Save',
    	    'decorators' => array(
    		'ViewHelper',
    		array(array('td' => 'HtmlTag'), array('tag' => 'td', 'colspan'=>'3', 'align' => 'right')),
    		array(array('tr' => 'HtmlTag'), array('tag' => 'tr'))
    	    )
            ));
     
    	$this->addDisplayGroup(
    	    array(
    		'price_open_training_standart',
    		'price_open_training_advance',
    		'price_dedicated_class_on_customer_site_standart',
    		'price_dedicated_class_on_customer_site_advance',
    		'price_virtual_learning_standart',
    		'price_virtual_learning_advance',
    		'price_self_paced_training_standart',
    		'price_self_paced_training_advance',
    		'price_cost_travel',
    		'submit_ot'
    	    ),
    	    'span3',
    	    array(
    		'decorators' => array(
    		    'FormElements', array(
    			'HtmlTag', array('tag' => 'table', 'class' => 'span3')
    		    )
    		)
    	    )
    	);
        }
     
    }
    Voila donc, ce n'est pas un gros soucis mais je dois absolument les afficher hors je suis vraiment bloqué. Merci d'avance.
    Images attachées Images attachées  

  2. #2
    Modératrice
    Avatar de Celira
    Femme Profil pro
    Développeuse PHP/Java
    Inscrit en
    Avril 2007
    Messages
    8 633
    Détails du profil
    Informations personnelles :
    Sexe : Femme
    Âge : 39
    Localisation : France

    Informations professionnelles :
    Activité : Développeuse PHP/Java
    Secteur : Industrie

    Informations forums :
    Inscription : Avril 2007
    Messages : 8 633
    Points : 16 372
    Points
    16 372
    Par défaut
    Tu peux regarder du coup de ce post. En gros, il faut définir un Decorator spécifique qui construit la table.
    Modératrice PHP
    Aucun navigateur ne propose d'extension boule-de-cristal : postez votre code et vos messages d'erreurs. (Rappel : "ça ne marche pas" n'est pas un message d'erreur)
    Cherchez un peu avant poser votre question : Cours et Tutoriels PHP - FAQ PHP - PDO une soupe et au lit !.

    Affichez votre code en couleurs : [CODE=php][/CODE] (bouton # de l'éditeur) et [C=php][/C]

Discussions similaires

  1. Zend form, ajouter un caractère derrière un input text
    Par supertotal dans le forum Zend_Form
    Réponses: 7
    Dernier message: 24/02/2012, 18h00
  2. Réponses: 2
    Dernier message: 16/12/2009, 16h07
  3. Interaction Requetes/Forms/Tables
    Par [thebadskull] dans le forum Access
    Réponses: 3
    Dernier message: 12/05/2006, 18h02
  4. Mise en forme table access par VBA ou SQL
    Par romrai dans le forum Requêtes et SQL.
    Réponses: 4
    Dernier message: 21/02/2006, 12h29
  5. selection multiple vers une table ajout
    Par EE dans le forum Access
    Réponses: 12
    Dernier message: 18/05/2005, 16h56

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo