[html-formfu] ExtJS - Custom Elements

Benjamin Martin benjamin.martin at ims-evolve.com
Thu Nov 11 15:02:03 GMT 2010

On 11/11/10 00:13, Moritz Onken wrote:
> Both of them are necessary. Look at HTML::FormFu::ExtJS::Element::ExtJS::TabPanel
> and HTML::FormFu::Element::ExtJS::TabPanel respectively.

Hello Moritz,

Thanks very much for the info.. I looked at TabPanel and I sort of see 
some of how things fit together.

I created these files:

Added this in the config:

   - name: the_start_time
     type: +MyApp::FormFu::Element::Time
     label: Start Time

I am sure I will need to add extra code soon, but for now the files look 
like this:

-- lib/MyApp/FormFu/Element/Time.pm --

package IMS::EV2::FormFu::Element::Time;
use base HTML::FormFu::Element::Text;

-- lib/MyApp/FormFu/ExtJS/Element/Time.pm --

package MyApp::FormFu::ExtJS::Element::Time;
use base "HTML::FormFu::ExtJS::Element::_Field";
use strict;
use warnings;
use utf8;
sub render {
   my $class = shift;
   my $self = shift;
   my $super = $class->SUPER::render($self);
   return { %{$super}, xtype => "timefield" };

Thanks again for the info... and for the FormFu::ExtJS, I am new to it 
all, but so far seems to be working out nicely.


More information about the HTML-FormFu mailing list