DBIx-HTML-PopupRadio

 view release on metacpan or  search on metacpan

examples/test-complex-popup-radio.cgi  view on Meta::CPAN

21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
# -----------------------------------------------
 
delete @ENV{'BASH_ENV', 'CDPATH', 'ENV', 'IFS', 'SHELL'}; # For security.
 
my(%popup_data) =
(
        one     =>
        {       comment         => 'Demonstrate returning an id when the user selects a name',
                default         => '',                       # Default menu item number.
                menu            => '',                       # Menu in HTML returned from menu object.
                name            => 'campus_1',       # CGI name of menu.
                object          => '',                       # Menu object returned from DBIx::HTML::PopupRadio.
                order           => 1,                        # Sort order of menus down the page.
                previous        => '',                       # Previous user selection for this menu.
                prompt          => '',                       # Prompt at top of menu.
                sql                     => 'select campus_id, campus_name from campus',
        },
        two =>
        {       comment         => 'Demonstrate returning a name when the user selects a name',
                default         => '',
                menu            => '',
                name            => 'campus_2',

examples/test-complex-popup-radio.cgi  view on Meta::CPAN

80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
                prompt          => '',
                sql                     => 'select campus_id, campus_name from campus',
        },
);
my(%radio_data) =
(
        one     =>
        {       comment         => 'Demonstrate default = scc107m, linebreak = 0',
                default         => 'scc107m',
                linebreak       => 0,
                menu            => '',                       # Menu in HTML returned from menu object.
                name            => 'radio_1',        # CGI name of menu.
                object          => '',                       # Menu object returned from DBIx::HTML::PopupRadio.
                order           => 1,                        # Sort order of menus down the page.
                previous        => '',                       # Previous user selection for this menu.
                sql                     => 'select unit_id, unit_code from unit order by unit_code',
        },
        two =>
        {       comment         => 'Demonstrate default = scc109m, linebreak = 1',
                default         => 'scc109m',
                linebreak       => 1,
                menu            => '',
                name            => 'radio_2',

lib/DBIx/HTML/PopupRadio.pm  view on Meta::CPAN

530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
You will have to patch these 2 programs vis-a-vis the db vendor, username
and password.
 
The sample data in bootstrap-menus.pl is simple, but is used by several
modules, so do not be too keen on changing it :-).
 
=head1 See Also
 
        CGI::Explorer
        DBIx::HTML::ClientDB
        DBIx::HTML::LinkedMenus
 
The latter 2 modules will be released after the current one.
 
=head1 Repository
 
 
=head1 Support
 
Bugs should be reported via the CPAN bug tracker at



( run in 0.376 second using v1.01-cache-2.11-cpan-26ccb49234f )