Helper pour la gestion des champs, issue #0001008
This commit is contained in:
parent
c34efc45f8
commit
30e2a2943a
42
application/views/default/helpers/Field.php
Normal file
42
application/views/default/helpers/Field.php
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
<?php
|
||||||
|
require_once 'Scores/SessionCiblage.php';
|
||||||
|
|
||||||
|
/**
|
||||||
|
- Définition paramètres d'un champ
|
||||||
|
array( key => array(
|
||||||
|
'label' =>
|
||||||
|
'fields' => array(
|
||||||
|
0 => array(
|
||||||
|
type => {select, text, slider, autocomplete},
|
||||||
|
value =>
|
||||||
|
)
|
||||||
|
... multiple champs possible, 0 est le primaire ...
|
||||||
|
)
|
||||||
|
))
|
||||||
|
|
||||||
|
- Défintion de la structure HTML
|
||||||
|
<div class="fieldgrp">
|
||||||
|
<label>Votre E-mail</label>
|
||||||
|
<div class="field">
|
||||||
|
<input class="_" type="_" name="_" value=""/>
|
||||||
|
<span>Texte, bouton de validation, lien pour afficher, switcher vers un autre formulaire</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
*/
|
||||||
|
|
||||||
|
Class Zend_View_Helper_Field extends Zend_View_Helper_Abstract
|
||||||
|
{
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Affiche la structure d'un champ en fonction de sa définition
|
||||||
|
* @param string $name
|
||||||
|
*/
|
||||||
|
public function field($name)
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user