Catalyst-Controller-HTML-FormFu
view release on metacpan or search on metacpan
The form __uri_for(URI, PATH, PARTS)__ is also supported, which is
equivalent to $c->uri_for( 'URI', \@ARGS ). At this time, there is no
way to pass query values equivalent to $c->uri_for( 'URI', \@ARGS,
\%QUERY_VALUES ).
The second codeword that is being replaced is __path_to( @DIRS )__. Any
instance is replaced with the result of passing the DIRS arguments to
"path_to" in Catalyst. Don't use qoutationmarks as they would become
part of the path.
Default value: 1
default_action_use_name
If set to a true value the action for the form will be set to the
currently called action name.
Default value: false.
default_action_use_path
If set to a true value the action for the form will be set to the
currently called action path. The action path includes concurrent to
action name additioal parameters which were code inside the path.
Default value: false.
Example:
action: /foo/bar
called uri contains: /foo/bar/1
# default_action_use_name => 1 leads to:
$form->action = /foo/bar
# default_action_use_path => 1 leads to:
$form->action = /foo/bar/1
model_stash
Arguments: \%stash_keys_to_model_names
Used to place Catalyst models on the form stash.
If it's being used to make a DBIx::Class schema available for
"options_from_model" in HTML::FormFu::Model::DBIC, for Select and other
Group-type elements - then the hash-key must be schema. For example, if
your schema model class is MyApp::Model::MySchema, you would set
model_stash like so:
<Controller::HTML::FormFu>
<model_stash>
schema MySchema
</model_stash>
</Controller::HTML::FormFu>
context_stash
To allow your form validation packages, etc, access to the catalyst
context, a weakened reference of the context is copied into the form's
stash.
$form->stash->{context};
This setting allows you to change the key name used in the form stash.
Default value: context
languages_from_context
If you're using a L10N / I18N plugin such as Catalyst::Plugin::I18N
which provides a languages method that returns a list of valid
languages to use for the currect request - and you want to use formfu's
built-in I18N packages, then setting "languages_from_context"
localize_from_context
If you're using a L10N / I18N plugin such as Catalyst::Plugin::I18N
which provides it's own localize method, you can set
localize_from_context to use that method for formfu's localization.
request_token_enable
If true, adds an instance of HTML::FormFu::Plugin::RequestToken to
every form, to stop accidental double-submissions of data and to
prevent CSRF attacks.
request_token_field_name
Defaults to _token.
request_token_session_key
Defaults to __token.
request_token_expiration_time
Defaults to 3600.
DISCONTINUED CONFIG SETTINGS
config_file_ext
Support for this has now been removed. Config files are now searched
for, with any file extension supported by Config::Any.
config_file_path
Support for this has now been removed. Use
{constructor}{config_file_path} instead.
CAVEATS
When using the Form action attribute to create an empty form, you must
call $form->process after populating the form. However, you don't need
to pass any arguments to process, as the Catalyst request object will
have automatically been set in $form->query.
When using the FormConfig and FormMethod action attributes, if you make
any modifications to the form, such as adding or changing it's
( run in 0.564 second using v1.01-cache-2.11-cpan-39bf76dae61 )