On 18/07/07, Tobias Kremer <[EMAIL PROTECTED]> wrote: > Hi Carl, > > Tobias Kremer <[EMAIL PROTECTED]> wrote: > > I'm wondering why there still is no such thing as a Date element consisting > > of three select fields (day, month, year)? Am I the only person who doesn't > > like giving users a stupid textfield for entering dates? I don't like > > JavaScript popup calendars attached to textfields either. And most of the > > sites I checked are using this multi-select-fields approach which makes me > > believe that it's a very common thing users are expecting. > > I just wanted to kindly ask if you're having a stab at this one so that we > can stick to HTML::FormFu for the large web application we're currently > developing. FormFu has already proven to be VERY helpful when it comes to > form rendering (although it still is a bit slow, but not _that_ slow compared > to the other form frameworks out there).
I've now checked in a new 'date' element. I've still got some more features to add to it, but it's got the basics down. --- elements: - type: date name: foo auto_inflate: 1 will automatically create 3 select menus with the names "foo.day", "foo.month" and "foo.year". The individual select menu's parameters are not deleted from $form->params, otherwise it couldn't set the 3 menu's previously chosen values if the form's redisplayed after a submission. See the documentation for overriding the names of the select menus, the lists of months and years and other details. Setting auto_inflate(1) automatically adds a DateTime inflator to the element. Feedback welcome. Carl _______________________________________________ HTML-FormFu mailing list HTML-FormFu@lists.scsys.co.uk http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/html-formfu