For Programmers: Free Programming Magazines  


Home > Archive > PHP Pear > June 2005 > separators for HTML_QuickForm_date elements









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author separators for HTML_QuickForm_date elements
Emmanuel

2005-06-09, 3:57 pm

Hi,

i saw a lot of threads about groups and separators but i could find a
answer to that :
can we set customized separators for HTML_QuickForm_date's elements ?

As it inherits from HTML_QuickForm_group, i thought i could set the
'_separator' property, as it works for a group created with 'addGroup()'.
i mean for ex :
/ $txtElm1=&HTML_QuickForm::createElement('text', 'nombre1',
'Nombre 1'.':', array('size'=>30, 'maxlength'=>100));
$txtElm2=&HTML_QuickForm::createElement('text', 'nombre2',
'Nombre 2'.':', array('size'=>30, 'maxlength'=>100));
$txtElm3=&HTML_QuickForm::createElement('text', 'nombre3',
'Nombre 3'.':', array('size'=>30, 'maxlength'=>100));
$grupoTexto =
&$this-> addGroup(array($txtElm1,$txtElm2,$txtElm
3),'GrupoTexto','label
grupo :','-');
$grupoTexto->_separator=array('-','-');
/
This works fine. But if i try it for a HTML_QuickForm_date it has no
effect :

/ $dateFrom = new HTML_QuickForm_date('dateFrom','Fecha',
array('language'=>'es','format'=>'dFYHi'));
$dateFrom->_separator=array('','','@','h');
$this->addElement($dateFrom);

/Any idea ?
Thanks.


Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com