Form::Sensible::Renderer::HTML - an HTML based Form renderer
use Form::Sensible::Renderer::HTML; my $object = Form::Sensible::Renderer::HTML->new(); $object->do_stuff();
Renders a form as an HTML form. Returns a Form::Sensible::Renderer::HTML::RenderedForm object.
The Template object used by this renderer. You can provide your own by setting this attribute. If you do not set it, a new Template object is created using the parameter below.
If you want to search outside the templates distributed with
Form::Sensible for field or form templates, you can add additional paths as an arrayref here. This is useful if you want to override the some of the templates for your fields or forms.
This allows you to override just the elements you need to in your own theme, with all others being sourced from the Form::Sensible distribution ( IE provided theme and default theme ) Note that unless configured otherwise, if a template not found in the theme you selected, the
default theme will be searched as well.
An arrayref containing the filesystem paths to search for Form::Sensible's field templates. This defaults to including your base theme (if provided) and then the default theme:
$self->include_paths([ $self->path_to_theme($self->base_theme), $self->path_to_theme('default'); ]);
In most cases, you should not touch
include_paths, it is provided only for the case where Form::Sensible is not able to determine the location of it's templates on the filesystem. If you wish to add additional template paths, use the
additional_include_paths instead. Note also that care should be taken overriding
include_paths because this fallback behavior is based only on the include path order.
The theme to use for form rendering. Defaults to
default, default uses
<div>'s for layout. There is also 'table' which uses HTML tables for form layout.
The config used when creating a new Template object. If you set this manually, you will need to be sure to set the Template's
INCLUDE_PATH yourself or rendering will be unable to find any field templates. You can obtain the include path that would have been used by calling
Default options to pass through to the RenderedForm.
render($form, $stash_prefill, $options)
Returns a RenderedForm for the form provided.
These are passed to the Template::Toolkit constructor
Returns a new Template object created using the
Returns the filesystem path to the theme provided. If no
$theme is passed, it will provide the path to the
base_theme for the renderer object.
Returns the complete calculated include paths to be passed to the Template object taking into account both the
include_paths as well as
Jay Kuri - <firstname.lastname@example.org>
Ionzero LLC. http://ionzero.com/
Copyright 2009 by Jay Kuri <email@example.com>
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.