Différences
Ci-dessous, les différences entre deux révisions de la page.
Les deux révisions précédentes Révision précédente Prochaine révision | Révision précédente | ||
slam4:php:phalcon:viewhelpers [2016/01/31 13:56] – [View Helpers] jcheron | slam4:php:phalcon:viewhelpers [2019/08/31 14:21] (Version actuelle) – modification externe 127.0.0.1 | ||
---|---|---|---|
Ligne 65: | Ligne 65: | ||
{{end_form()}} | {{end_form()}} | ||
</ | </ | ||
- | ===== -- Eléments | + | ===== -- Éléments |
- | ===== -- Modification des attributs des éléments ===== | + | ==== phtml ==== |
+ | <sxh php> | ||
+ | <? | ||
+ | echo $this-> | ||
+ | |||
+ | echo $this-> | ||
+ | " | ||
+ | "This is the content of the text-area", | ||
+ | " | ||
+ | " | ||
+ | )); | ||
+ | |||
+ | echo $this-> | ||
+ | " | ||
+ | " | ||
+ | )); | ||
+ | |||
+ | echo $this-> | ||
+ | " | ||
+ | " | ||
+ | )); | ||
+ | </ | ||
+ | |||
+ | ==== volt ==== | ||
+ | |||
+ | <sxh html> | ||
+ | {{ text_field(" | ||
+ | |||
+ | {{ text_area(" | ||
+ | |||
+ | {{ password_field(" | ||
+ | |||
+ | {{ hidden_field(" | ||
+ | </ | ||
+ | ===== -- Modification des valeurs des éléments ===== | ||
+ | |||
+ | Les éléments de formulaire possédant un attribut **value** peuvent être affectés à la création : | ||
+ | |||
+ | ==== phtml ==== | ||
+ | |||
+ | <sxh php> | ||
+ | <? | ||
+ | echo $this-> | ||
+ | echo $this-> | ||
+ | " | ||
+ | "This is the content of the text-area", | ||
+ | " | ||
+ | " | ||
+ | )) ?> | ||
+ | </ | ||
+ | |||
+ | ==== volt ==== | ||
+ | |||
+ | <sxh html> | ||
+ | {{ text_field(" | ||
+ | |||
+ | {{ text_area(" | ||
+ | </ | ||
+ | |||
+ | Il est également possible, préférable (pour l' | ||
+ | |||
+ | |||
+ | <sxh php; | ||
+ | class ProductsController extends Controller | ||
+ | { | ||
+ | public function indexAction() | ||
+ | { | ||
+ | $this-> | ||
+ | } | ||
+ | } | ||
+ | </ | ||
===== -- Contenus statiques ===== | ===== -- Contenus statiques ===== | ||