Re: QF group required rule on Date element
| From: | Bertrand Mansion | Date: | Tue, 06 Jan 2004 11:42:33 +0000 |
| Subject: | Re: QF group required rule on Date element | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-9985@lists.php.net to get a copy of this message | ||
<mikeatwork@ukonline.co.uk> wrote :
> Hi,
>
> I have a group of two elements. One of these elements is the Date element..
> I wanted to make the date element (all three select menus) required within
> this group.
>
> Simply doing the usual...
>
> $this->addGroupRule('eventDateGroup', $language['L_RequireDate'],
> 'required', null, 1, 'client', false);
>
> This Doesn't work. The rule always equates to invalid. I'm not sure if this
> is because the 'Date' element itself is a group of select elements.
>
> I then tried to apply a group rule to a group rule...
>
> $this->addGroupRule('eventDateGroup', array(
> 'eventDate' => array( array($language['L_RequireDate'],
> 'required', null,
> 'client') )), null, null, 1, 'client', false);
>
> This causes Javascript errors because, I think, of how the variable name is
> created - something like...
>
> eventDateGroup[eventDate]Elements
>
> Does anybody have a suggestion on how to do this? Should I give up - if it
> is not possible?
I have never tried to add a date element in a group and I would say it is
not possible as it is a group itself and subgroups in QF are not supported
and can lead to unexpected results.
Maybe in a later release, we could convert those basic elements like date
and hierselect not to be treated like groups but that's not the case today.
Bertrand Mansion
Mamasam