Bonjour à tous,

J'aimerais savoir de quelle manière je pourrais faire ce formulaire en utilisant Zend_Form et en respectant l'architecture MVC.

Voilà le code du 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
 
<form class="orderfixedlabel" method="post" action="">
<table id="primwaytable">
  <thead>
 	 <?php echo $this->orderBy()->th($this->orderKeys, $this->baseUrl('') . '/public/images/'); ?>
  </thead>
  <tbody>
<?php $indice = 0; foreach ($this->fixedlabelsdefinition as $fixedlabelsdefinition) : ?>
  <tr>
    <td><?php echo $fixedlabelsdefinition['Primway_Label_name']; ?></td>
    <td><?php echo $fixedlabelsdefinition['Label_StoreGrp']; ?></td>
    <td><?php echo $fixedlabelsdefinition['Label_Familly']; ?></td>
    <td><?php echo $fixedlabelsdefinition['DO_Label_name']; ?></td>
    <td><?php echo $fixedlabelsdefinition['Label_Description']; ?></td>
    <td><?php echo $fixedlabelsdefinition['Minimum_Order_Qty']; ?></td>
    <td><?php echo $fixedlabelsdefinition['Packaging']; ?></td>
    <td><?php echo $fixedlabelsdefinition['Selling_Price']; ?>&nbsp;<?php echo $fixedlabelsdefinition['SellingPrice_currency']; ?>&nbsp;/<?php echo $fixedlabelsdefinition['SellingPrice_Unit']; ?></td>
  <td><?php if($fixedlabelsdefinition["Picture_path"] != ""): ?><a rel="lightbox" href="<?php echo URI; ?>/public/media/fixedlabels/<?php print $fixedlabelsdefinition["Picture_path"]; ?>"><img src="<?php echo URI; ?>/public/media/fixedlabels/thumbnail/<?php print $fixedlabelsdefinition["Picture_path"]; ?>" /><?php endif; ?></a></td>
    <td>
    	<p>
    		<input type="hidden" name="Labelid_<?php echo $indice; ?>" value="<?php echo $fixedlabelsdefinition['Label_id'] ?>" />
    		<input type="text" name="quantity_<?php echo $indice; ?>" value="<?php if (isset($this->infos[$indice]['quantity'])) : echo $this->infos[$indice]['quantity']; endif; ?>" class="quantity" />
    	</p>
    	<p class="errors"><?php if (isset($this->infos[$indice]['erreur'])) : echo $this->infos[$indice]['erreur']; endif; ?></p>
    </td>
  </tr>
<?php $indice++; endforeach; ?>
  </tbody>
</table>
<p><input type="submit" name="submit_global" value="" id="submit" /></p><br />
</form>