P Kishor wrote:

CGI::Application::Dispatch->dispatch(
    prefix  => '',
    default => '',
    debug => 1,
    table => [
        ''                   => { app => $App, rm => 'view' },
        'find'               => { app => $App, rm => 'find', },
        'view/:p?/:o?/:s?'   => { app => $App, rm => 'view', },
        'edit/:p/:o?'        => { app => $App, rm => 'edit', },
        'other_pages/:p/:o?' => { app => $App, rm => 'other_pages', },
        'create/:p/:o?'      => { app => $App, rm => 'create', },
        'save[post]'         => { app => $App, rm => 'save', },
        '/:p?/:o?/:s?'       => { app => $App, rm => 'view' },
    ],
    args_to_new => {
..
        },
    },
);

The 'create' runmode presents a form with 'method="post"' and
'action="index.cgi"' and a [submit] button named 'rm' with
'value="save"' but the debug switch in the C:A:D table sends messages
to the log that show that the 'save' rule is never matched.

Dispatch dispatches based on the URL. In your case that URL is going to be "index.cgi". Change the action to be "/save", keep your method as "post" and remove the name "rm" from that button (nameless buttons are pretty common in web forms).

--
Michael Peters
Plus Three, LP


#####  CGI::Application community mailing list  ################
##                                                            ##
##  To unsubscribe, or change your message delivery options,  ##
##  visit:  http://www.erlbaum.net/mailman/listinfo/cgiapp    ##
##                                                            ##
##  Web archive:   http://www.erlbaum.net/pipermail/cgiapp/   ##
##  Wiki:          http://cgiapp.erlbaum.net/                 ##
##                                                            ##
################################################################

Reply via email to