* @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" ); // create the form $form =& patForms_Parser::createFormFromTemplate( 'SimpleRenderer', 'templates/example_parser_attributes.fhtml', 'templates/example_parser_attributes.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(); ?>