Introduction to Templates

DWsurvey contains a template management system. The layout of the page that your users see is stored in the database and can be edited from the Options navigation menu and Edit Templates.

From this page you can manage template sets. These allow you to create multiple looks and feels to your surveys and you can assign a different look and feel to each survey if you so wish.

Editing Templates

To begin editing your templates you need to select which template set you wish to edit. We don't recommend you edit the default template set as this is automatically modified upon upgrades. Any new template sets you create are based on the default template set initially but modified files are left unchanged upon upgrade and it's down to you to apply any changes to those modified template sets.

Select your template set from the top drop down selection box and that page should refresh automatically. If it does not then simply hit the Switch button.

You will see below this select box, once the page has refreshed, a list of the templates available to be edited. Simply click on the title of a template to begin editing it.

Editing an individual templates is, for the most part, plain HTML. Simply edit the code in the main text area and press the edit template button at the bottom. Some templates have some special tags, which can be identified by being text surrounded by square brackets [ ]. Some of these are conditional, for example in the screen capture below you can see [ifmultipage] and [/ifmultipage]. This means that the contents between these two tags will only be displayed if a multipage survey is being displayed.

Some of these other tags may be references to other templates (you can easily tell this by turning on Webmaster Mode in your options and viewing the outputted HTML page source code). In the example below the [submitbuttons] tag calls the submitbuttons template.

Creating a template set

To create a new template set click on the Create a new template set link on the main templates page.

You will be asked to name your new template. You can choose any descriptive name you like to help you remember it. This new template set will take a copy of the default template set as it's base model.

Applying a template set to a survey

You can apply a template set to an individual survey from either when creating a new survey or the edit survey page by selecting it's template set from a drop down selection box.