HTML_QuickForm - setDefaults for 'date' element
| From: | Stefano Tulini - Akensoft | Date: | Thu, 25 Aug 2005 02:08:04 +0000 |
| Subject: | HTML_QuickForm - setDefaults for 'date' element | ||
| Groups: | php.pear.general | ||
| Request: | Send a blank email to pear-general+get-20583@lists.php.net to get a copy of this message | ||
Hi, I have the following problem.
I have an element of type 'date', constructed as follows.
$iscr_form->addElement('date', 'DataRinnovo', 'Data di
rinnovo: ',
array('format' => 'd . F . Y', 'language' => 'it',
'minYear' => $data_year,
'maxYear' => $data_year+1), array("class"=>"loginform"));
It's works fine. The 'year' field has a range between the current year and
the next.
I want to set the fields 'day' and 'month' with the values of current day
and month. These values are stored in 2 variables: $data_day and $data_month.
I tried using the setDefaults method in various way, but without success.
What's the right sintax for setDefaults method in association with 'date'
element?
Someone can help me?
Thanks
-------------------------------------------
Akensoft
Stefano Tulini
Titolare e Responsabile tecnico
Via della Goletta 50
I-56121 Pisa PI
Tel.: 050 40361 (Studio)
338 4344383 (cellulare)
E-Mail: stefano@akensoft.it