Navigation
Download
Project page
Forums

Main

SourceForge.net Logo

English Readme      Swedish Readme


Features:


HTML Templates


    So what is a HTML Template?
The way HTML Form Genie, defines HTML Templates is simply HTML documents who specify how the output data should look. There are for the moment 2 situations in which you can use HTML Templates. The result of the Form data can be emailed as HTML. Then you need to specify an HTML template which declares how the general outlook of the mail should be and where the actual data from the Form should be placed. It can do so wth special output fields. These fields start and end with a $. In between the name of the desired field is written.
    So if I for example have a input field in the Form called AdvertText, I type $AdvertText$ where I want the value of the AdvertText input field to be written.
    The other use of HTML Templates is the missing fields page. You can decide to have a page which displays the input fields which were not filled in but which are required to be so. Just create a HTML document and add $missing_fields_out$ where you want the missing fields to be written. If you want some HTML tag to be written before and after every missing item, use the template_pre_tag and redirect_delimeter options.

    So what are the security aspects of using HTML Templates?
Since the HTML Form Genie has the same access as the user which runs the Web Server, caution is adviced when using templates. Without any restrictions the script would happily return any file on the system which it has read access to. HTML Form Genie try and remove that possibility with the TEMPLATE_RESTRICT define. This option simply locks all read access to one single directory on the system. It also tries to verify that the document specified as a template, really is a HTML document. More information can be found in the READMEs.

    Required Fields
It is possible to specify certain fields which should be required to contain a value. If any of these fields is empty, HTML Form Genie will report an error or redirect to an error page. Either an ordinary HTML page, with the missing_fields_redirect option or to an HTML template file with the redirect_template option.

    SQL
For the moment the support for SQL in HTML Form Genie is very basic. It supports saving the data from the form to a mySQL database. However more functionality will be added further on.