Changes

From SME Server
Jump to navigationJump to search
1,325 bytes added ,  00:17, 20 December 2013
Created page with "{{Level|Developer}} === NAME === CGI::FormMagick::Events -- pre/post form/page event handlers In a root terminal you can do the command below if you want to display the..."
{{Level|Developer}}
=== NAME ===
CGI::FormMagick::Events -- pre/post form/page event handlers
In a root terminal you can do the command below if you want to display the up-to-date content
perldoc CGI::FormMagick::Events
=== SYNOPSIS ===
use CGI::FormMagick;

=== DESCRIPTION ===
==== $fm->form_pre_event() ====

performs the PRE-EVENT (if any) for the form. Usually used to do setup for the application.

this is the routine where we call some routine that will give us default data for the form, or otherwise do things that need doing before the form is submitted.

==== $fm->form_post_event() ====

performs validation and runs the POST-EVENT (if any) otherwise just prints out the data that the user input

Note: we need to validate EVERY ONE of the form inputs to make sure malicious attacks don’t happen. See also "SECURITY CONSIDERATIONS" in the perldoc for how to get around this :-/
==== $fm->page_pre_event() ====

Performs the PAGE PRE-EVENT (if any).

XXX NEEDS TESTS

==== $fm->page_post_event() ====

Performs the PAGE POST-EVENT (if any).

XXX NEEDS TESTS

=== SEE ALSO ===
[http://wiki.contribs.org/CGI::FormMagick CGI::FormMagick]
[[Category:Howto]]
[[Category:SME Server Development Framework]]
[[Category:Development Tools]]
[[Category:SME9-Development]]

Navigation menu