Main /
TemplateOverviewTemplatesA template lets a convention administration build and configure screens to be shown to attendees. Traditionally, templates are used for building online registration screens, but they can be used for anything. Steps to create templates
Displaying a template from a link or form<a href="mainpage.php?page=templatename"> or <form method="post" action="mainpage.php"> <input type="hidden" name="page" value="templatename"> </form> Linking forms with hidden fieldsAny post form in the template can define what is to happen when the form from the template is submitted. A typical arrangement woudl be: <form method="post" action="process.php" onSubmit="return emailCheck(this.email.value)"> <div> <input type="hidden" name="process" value="createlogin"> <input type="hidden" name="success" value="okcreate"> <input type="hidden" name="failure" value="failedcreate"> <input type="hidden" name="cancelpage" value="cancelpage"> </div> </form> In this case, when a submit button is hit on this form, it will run the 'createlogin' function in the processing script. If the process succeeds, the template 'okcreate' will be displayed. If it fails, then the 'failedcreate' template will be shown. Cancel buttons are special - the 'cancel' variable is checked on submission, if it is hit, then the template specified in the 'cancel' value will be displayed. No further processing is done. Notes about templatesTemplates should have minimal formatting in them. Formatting should be done via the stylesheet, as defined in the Convention Details screen in Coconut. The stylesheet can be included in any template by including this line in the <head> block: <link rel="stylesheet" href="stylesheet-handler.php" type="text/css"> |