| Index
» Projekty
» phpMyEdit
» Fórum
» Three dropdowns for one DATE (DOB) field |
 |
debstar
Založený: 13.09.2004
Príspevky: 4
Bydlisko: UK/Australia
Zaslal: 2004-09-13 20:09
Návrat hore
Odpovedať s citátom
|
Hi,
I want to enter a date value into column DOB but without using the calendar popup extension. The DOBs are of primary school kids and therefore we will only be entering a specific range (1990-2000).
My problem is that I do not know how to create more than one dropdown list for just one field.
I would like to have three dropdowns to control the input of YEAR-MONTH-DAY (having just *one* DOB column in my table instead of three - one for year, one for month & one for day - that's my last resort!). At the moment I can only create one dropdown for the YEAR range (see code below).
$opts['fdd']['DOB'] = array(
'name' => 'DOB',
'select' => 'N',
'maxlen' => 10,
'default' => '0000-00-00',
'required' => true,
'sort' => true,
'values' => range($maxStudentDOB,$minStudentDOB),
);
Any help appreciated,
Thanks
(& thanks for phpMyEdit!)
|
michal
Založený: 17.06.2003
Príspevky: 537
Bydlisko: Slovakia
Zaslal: 2004-09-14 17:55
Návrat hore
Odpovedať s citátom
|
well easiest way is to setup 3 dummy/virtual fields (year, month, day). options just 'AC' so that it does not try to fetch them from DB.
for Add: in your TIB make them come into just one field, unset the other 2. with CVS version of pme.
for Change: TUB will be harder. you will have to patch CVS class with patch from bug #185/262 (and please confirm that it's working). plus an 'sql' option will be needed to fetch just month/year/date. i don't know which one.
|
debstar
Založený: 13.09.2004
Príspevky: 4
Bydlisko: UK/Australia
Zaslal: 2004-09-15 09:41
Návrat hore
Odpovedať s citátom
|
Thanks Michal,
At first glance the info provided is a bit over my head *but* I'll have a crack at it!
|
|
Odoslať novú tému
Odpovedať na tému
|
|
|
|