Groups dans les formulaires

2 views
Skip to first unread message

Stéphane Gully

unread,
Mar 11, 2009, 11:14:55 AM3/11/09
to px...@googlegroups.com
Bonjour,

Il est maintenant possible de créer des groupes dans Pxxo_Widget_Form.
Comment ? Voici un petit exemple qui regroupe deux inputs :
require_once "Pxxo/Widget/Form.php";
$params = array();
$params['inputs'] = array();
$params['inputs'][] = array('id' => 'id_de_mon_text',
'label' => 'Un input text',
'type' => 'text',
'value' => 'un texte'
);
$params['inputs'][] = array('id' => 'id_de_mon_textarea',
'label' => 'Un input textarea',
'type' => 'textarea',
'size' => array(30,5),
'value' => 'un texte long'
);
$params['groups'] = array();
$params['groups'][] = array('name' => 'Légende de mon fieldset',
'inputs' => array('id_de_mon_text', 'id_de_mon_textarea'));
$o = new Pxxo_Widget_Form($params);

Stéphane
Reply all
Reply to author
Forward
0 new messages