View on
MetaCPAN is shutting down
For details read Perl NOC. After June 25th this page will redirect to
Philip Crow > Bigtop > docs/keyword_cookbook/field/html_form_foreign/discussion


Annotate this POD


New  3
Open  1
View/Report Bugs


All field keywords beginning with html_form_ are passed directly into the form hash. Thus, they are really defined in which ships with Gantry.

html_form_foreign applies only when the field's html_form_type is display. It indicates that this field is a foreign key and foreign_display should be used to get a human readable value to display instead of showing the rather meaningless foreign row id.

Note that this keyword is usually used when two different versions of a form are presented depending on the context. The base form uses html_form_type select and html_form_foreign is ignored. Later, another form is displayed (to a less priviledged user) which uses html_form_type display. The form type is usually switched with the Gantry::Utils::FormMunger.


To see an example, build:

    bigtop -c example.bigtop all

Change to the newly created Kids directory and look in the form method in lib/Kids/GEN/ Note the use of data statements to populate the table. See the pod for Gantry::Utils::FormMunger for a more natural approach.

syntax highlighting: