Re: [HTML_Quickform] pass thru of attributes in date?
| From: | Bertrand Mansion | Date: | Wed, 12 Mar 2003 16:03:39 +0000 |
| Subject: | Re: [HTML_Quickform] pass thru of attributes in date? | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-4181@lists.php.net to get a copy of this message | ||
<ghopson@mac.com> wrote :
> Hi,
>
> I have just started with PHP and Quickform, so please excuse my
> ignorance if this is stupid.
>
> I want to be able to specify a stylesheet definition on each of the
> select boxes on date, and even though I create the date element thus:
>
> $form->addElement('date', 'cny_reg_date', 'Date:',
> array('format'=>'d-F-Y'), "class=\"selbox\"");
>
> My stylesheet does not get passed through. So I have edited date.php as
> follows (only included one switch statement - you get the drift)
>
> switch ($sign) {
> case "D" :
> // Sunday is 0 like with 'w' in date()
> $options = $this->_options[$this->language]["weekdays_short"];
> $this->dateSelect[$sign] = &new HTML_QuickForm_select($selectName);
> $this->dateSelect[$sign]->load($options, $selectedValue);
> ---> $this->dateSelect[$sign]->setAttributes($this->_attributes);
> break;
This looks correct, I'll add the possibility to set attributes for selects
in date element (I forgot to do so). Thanks for reminding me. I'll fix that
among other things in date element.
Cheers,
Bertrand Mansion
Mamasam