[html-formfu] Date + Time Select boxes?

Jens Schwarz blacky6767 at gmx.de
Wed Dec 3 08:25:07 GMT 2008


Hi,

-------- Original-Nachricht --------
> Datum: Wed, 26 Nov 2008 14:55:42 +0000
> Von: "Carl Franks" <fireartist at gmail.com>
> An: "HTML Form Creation, 	Rendering and Validation Framework" <html-formfu at lists.scsys.co.uk>
> Betreff: Re: [html-formfu] Date + Time Select boxes?

> 2008/11/26 Jens Schwarz <blacky6767 at gmx.de>:
> > Putting a 'Date' and two 'Select' elements (i.e. hour and minute) into a
> 'Multi' element does not seem to work (I have read this somewhere in the
> depths of this malinglist and also tried it by my own hand) - mainly because
> of the 'Date' element being a 'Multi' element itself.
> >
> > So my question: How do you implement such a 'DateTime' element so that
> it runs smoothly with Catalyst and DBIx?
> 
> I've added a DateTime element to svn.
> It's a sub-class of HTML/FormFu/Element/Date.pm and adds extra 'hour'
> and 'minute' Select menus.
> 
> (...)

I would prefer not having to use the svn version of FormFu. Is there another option/workaround for this? Something like "changing a submitted value before updating/inserting it into the DB" or "concatenate two submitted values to a single value before updating/inserting it into the DB"?
Right now I have manually added two selects (via "Multi") as hour and minute to my foo.yml. The only problem is: How can I append its submitted value (CompoundSprintf = '%02d:%02d:00') to the date field (strftime = '%Y-%m-%d') so that the resulting value can be put into the DB (mySQL datatype DATETIME - i.e. '%Y-%m-%d %02d:%02d:%02d')?

Greetings
Jens
-- 
Sensationsangebot verlängert: GMX FreeDSL - Telefonanschluss + DSL 
für nur 16,37 Euro/mtl.!* http://dsl.gmx.de/?ac=OM.AD.PD003K1308T4569a



More information about the HTML-FormFu mailing list