The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

Rose::DBx::Garden::Catalyst::Form - base RHTMLO Form class

DESCRIPTION

Rose::DBx::Garden::Catalyst::Form is a subclass of Rose::HTML::Form for using with YUI, RDBO and CatalystX::CRUD.

METHODS

init_metadata

Creates and returns a Rose::DBx::Garden::Catalyst::Form::Metadata object. This method will not be called if a metadata object is passed in new().

meta

Shortcut alias for metadata() accessor.

object_class

Shortcut to metadata->object_class.

hidden_to_text_field( hidden_field_object )

Returns a Text field based on hidden_field_object.

field_names_by_rank

Returns array ref of field names sorted numerically by their rank attribute. The rank is set in Rose::DBx::Garden according to the ordinal position of the corresponding db column.

build_form

Overrides base build_form() method to call interrelate_fields() if metadata->show_related_fields() is true.

interrelate_fields( [ N ] )

Called by build_form() before passing to the RHTMLO (SUPER) build_form() method.

interrelate_fields() will convert fields that return true from metadata->related_field() to menu or autocomplete type fields based on foreign key metadata from metadata->object_class().

In other words, interrelate_fields() will convert your many-to-one foreign-key relationships into HTML fields that help enforce the relationship.

The N argument is the maximum number of values to consider before creating an autocomplete field instead of a menu field. The default is 50, which is a reasonable number of options in a HTML menu.

init_with_object

Overrides base method to always return the Form object that called the method.

AUTHOR

Peter Karman, <karman at cpan.org>

BUGS

Please report any bugs or feature requests to bug-rose-dbx-garden-catalyst at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Rose-DBx-Garden-Catalyst. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.

SUPPORT

You can find documentation for this module with the perldoc command.

    perldoc Rose::DBx::Garden::Catalyst

You can also look for information at:

ACKNOWLEDGEMENTS

The Minnesota Supercomputing Institute http://www.msi.umn.edu/ sponsored the development of this software.

COPYRIGHT & LICENSE

Copyright 2008 by the Regents of the University of Minnesota.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.