For more information... RTFM!
NAVIGATION
RECENTLY VIEWED
PAGES THAT LINK HERE
ACCOUNT LOGIN

You are not logged in

Powered by Interchange version 5.7.0

FormAction

Define or override Interchange form actions with a Perl subroutine.

Synopsis

FormAction  action  sub { Perl code here }

Scope

This directive is available for use globally (in the "interchange.cfg" configuration file), and locally (in the "catalog.cfg" configuration file).

The global configuration affects all websites running under the Interchange instance.  Each individual website's local configuration will not affect or influence other websites in any way. 

Description

This directive allows Interchange "form actions" to be defined or overridden with a Perl subroutine.

Examples of pre-defined form actions are "refresh", "return" and "submit".

Interchange "form actions" are Perl subroutines that you can execute upon form submission.  See the Interchange form actions page.

You can trigger a form action in one of the following ways:

  • Call the "process" page with mv_todo or mv_doit set to the name of the action you would like to call.
  • Set the mv_action variable to the name of the action you would like to call.

Successfully executed form actions must return a true value, upon which Interchange will display the page specified by the mv_nextpage form variable.  If the form action returns false (zero, undef, blank etc.) then Interchange will not display anything at all.

Example

This is a very simple form action: 

FormAction  foo  <<EOA
sub {
    $CGI->{mv_nextpage} = 'bar';
    return 1;
}
EOA

If the "mv_action" is "foo" then the next page displayed will be "bar.html".

Categories:  Global config directives | Local config directives
Last modified by: Kevin Walsh
Modification date: Saturday 21 April 2007 at 10:49 AM (EDT)
Home  |  Legal nonsense  |  Privacy policy  |  Contact us