* @license LGPL, see license.txt for details * @link http://www.php-tools.net */ /** * Main examples prepend file, needed *only* for the examples framework! */ include_once 'patExampleGen/prepend.php'; $exampleGen->displayHead( 'Example' ); // EXAMPLE START ------------------------------------------------------ /** * main patForms class */ require_once $neededFiles['patForms']; /** * patForms parser class */ require_once $neededFiles['patForms_Parser']; /** * patErrorManager class */ require_once $neededFiles['patErrorManager']; /** * localisation stuff */ require_once $neededFiles['patI18n_configure']; // needed options patForms_Parser::setNamespace( "patForms" ); patForms_Parser::setCacheDir( "cache" ); // this is currently needed as the template caching needs the // renderer class to be loaded. This will not be necessary in // future versions. patForms::createRenderer( 'String' ); // create the form $form =& patForms_Parser::createFormFromTemplate( 'SimpleRenderer', 'templates/example_parser_radiogroups.fhtml', 'templates/example_parser_radiogroups.html' ); // use auto-validation $form->setAutoValidate( 'save' ); // render the content $content = $form->renderForm(); // check the form and display error messages if any if( $form->isSubmitted() ) { displayErrors( $form ); // see the patExampleGen/customFunctions.php file } // now display the form echo $content; // EXAMPLE END ------------------------------------------------------ $exampleGen->displayFooter(); ?>