| Sam Miller 2004-08-09, 8:56 pm |
| Hi
I'm using PEAR's quickform. It is quite useful, but sometimes it also
causes major headaches. Well, my problem at the moment is that I can't
get the date element to work properly. My code is:
$this->addElement('date', 'Birthdate', 'Date of Birth',
array('language'=>strtolower($_SESSION['language']),
'format'=>'Y Y',
'minYear'=>date('Y')-30,
'maxYear'=>date('Y'),
'addEmptyOption' => TRUE)
);
This causes QuickForm to add an empty option to my list. But instead of
adding it on top of everything (as it is described in the
documentation), it adds the empty value at the bottom of my select
fields. Also, the empty values are not selected by default.
So how do I get QuickForm to add an empty option on top of all other
values and select it by default? (I'm using QuickForm 3.2)
Any help would be appreciated. Thanks a lot
Sam
|