Pro Editor
English | Deutsch
Use the Pro editor to change to the page structure of the layout, the border layout for individual pages, the output for individual questions and the structure of the progress bar and plausibility checks. Use the debug mode to display table borders to facilitate debugging. You can upload the required files for project layout. You define wildcards for the application of dynamic contents. You can disable automatic calculation and specify a value for each page. |
Structure
EFS uses a so-called template system for ssytem layout. A template is an HTML file with wildcards inserted. These wildcards are used to apply “business logic” to the HTML page, for example necessary HTML code printed to an output page which is required by EFS for processing plausibility checks. With a few exceptions, you can freely restructure the HTML code. The templates of a specific project are customized in the Layout → Pro editor menu on the Structure tab. The following information can be found in the overview table:
For each template, there is a list containing the title as well as the file name, size, date of the last change and person who edited it.
The search function allows you to capture not only the template name and file name, but also the template content and related comments.
You can make notes on individual templates: By clicking on the Marker icon, you can open a pop-up window containing a comment field, enter your comment and save it.
Editing Templates
You have the following options for editing or creating templates:
By clicking on the title, you can open a template and edit its content.
If you insert the wildcard {debug} into a template (e.g. main.tpl), Save and then invoke a questionnaire page, variables will be displayed in a pop-up window. Please note that the usual wildcards of EFS cannot be used in the Smarty templates.
Click on the Create template button to create a new template.
You can duplicate templates that already exist by clicking on the Copy icon.
You can delete newly created and duplicated templates, but not system templates.
If you wish to restore the original state of a template during project creation, click on the Restore icon in the “Function” column.
Editing Templates Externally and Uploading them
You can export templates for further use on other EFS Survey installations or for local processing. To do so, click on the Export button. Similarly, you can use the Import button to upload external templates to the server, both individual templates and zip files containing several templates.
Debug Mode
EFS layouts work with invisible tables to position texts on a page. For debugging, it is often desirable to make table boundary lines temporarily visible. On the Debug mode tab, you can activate the table borders for all those who see the survey. Alternatively, you can make table borders visible only for those participants with a special IP address. Assume that your project is already in the field and you want to make changes to it on short notice. Naturally, you do not want your participants to see the table borders, so you restrict the view to yourself.
Upload
When designing the layout it is often necessary to load files up to the server, occasionally also to other directories than the directory /images used by the media library. To do this use the Upload function on the tab of the same name in the Pro editor. Here, you can also specify zip files, which will be unpacked to the desired directory.
The file size for importing data is limited. If your file exceeds the installations-specific threshold, a warning message will be displayed.
Uploading a New File
Select the character set.
Select the target directory.
Locate the desired file on the hard disk.
Confirm by clicking on Upload file.
The Pirectories of the project
Directory | Use |
---|---|
JavaScript | JavaScript files for the “Responsive Layout”. |
project directory/images | Images which were added to a project by the user, e.g. via the media library, are stored in this directory. |
Layout | All images supplied with a survey layout, e.g. graphical form elements, standard logos, are stored in this directory. |
CSS | CSS files. |
Wildcards
On the Wildcards tab, you can easily define dynamic contents for each questionnaire page outside of the actual questionnaire. You can use this feature, for example, to divide your survey into topic blocks and then to visualize this division in the layout. To do so, proceed as follows:
Click on the Wildcards tab.
Click on the page title of the first page of your project.
A form will appear, in which you can insert a maximum of five wildcards for this page. Type an arbitrary text into the Text 1 field, e.g. “Demographic questions”
Click on Save changes.
Repeat Steps 1 through 4 for further pages.
Now tell the layout where you would like to use the defined wildcards:
Switch to the Structure tab.
For example, edit the main.tpl template, to place the wildcards in the general page structure file.
Insert the {$r_text1} system variable anywhere on the page.
Take a look at the project in the preview. You will see that {$r_text1} has been replaced with the corresponding text from the database.
Wrap the wildcard in HTML code to achieve the desired appearance.
Progress Bar
The progress bar automatically activated by default calculates an estimated value for the as yet estimated remaining questionnaire length. This procedure has two disadvantages:
As already explained above, this is an estimation algorithm, as a precise prediction of the course of the questionnaire is usually not possible for a given respondent.
Automatic calculation evaluates all questionnaire pages. In practice, however, there is often the wish for an option to exclude the opening pages (containing, for example, the welcome, an introduction to the subject or a language selection question) from the count.
Alternatively, you can therefore deactivate the automatic calculation and determine a value the progress bar should take on for each page.
Progress Bar Algorithm
When a participant begins filling out a questionnaire it cannot usually be predicted how many questionnaire pages and which pages precisely they will actually see. To do so you would have to know in advance what filter branches the participant will pass - however filtering is mostly dependent on answers only given during the course of the questionnaire.
The progress bar values are therefore calculated in EFS via an estimation algorithm, which steadily approaches actual final length throughout the course of the questionnaire. Here, unavoidable jumps in the value, caused for example by filters, are kept to a minimum.
The formula is:
progress value (page x) = progress value (page x-1) + [{100- {progress value (page x-1)} / {denominator (page x) - numerator (page x)} ]
where:
denominator (page x) = (sum of pages submitted to date + 1) + (sum of all pages still anticipated after page x) and
numerator (page x) = number of all pages actually submitted to date
The progress value on the first page of the questionnaire is:
progress value (page 1) = 100 / sum of all pages in the questionnaire
The progress value on the final page is:
Progress value (final page) = 100
Changing Progress Bar Texts and Values Manually
The progress bar is usually activated, otherwise please activate it in Standard editor on the Progress bar tab. Switch to Pro editor and open the expert Progress bar tab. Deactivate “Calculate progress automatically” and confirm with Save settings. In projects with traditional system layout: The progress bar is usually deactivated. Please activate it in Standard editor on the Progress bar tab. Deactivate “Calculate progress automatically” and confirm with Save settings. Then, click on the newly-displayed Detailed settings link.
First, determine how many pages a participant is shown on average. For a project with no filters, this number corresponds to the number of survey pages. For a project with filters, count the number of pages a participant will see, add the rounded mean value from the sum of filter branches and enter the value into the “Total number of pages” field.
Now you can indirectly determine a value for the progress bar for each page: Just define the page number for each individual page from the participant’s point of view.
If the opening pages of the project are to be ignored, enter a value of 0 for these pages. Then, the pages will be excluded from the calculation, and a progress bar will not be displayed on them.
In the case of random blocks, the page-defined progress bar jumps. Therefore, for projects with “Random order” or “Random selection” branches, it is recommended that you use the automatically calculated display.
Modifying the Progress Bar
The progress bar is output via the “layout_progressbar.tpl” template. In detail, the display works as follows:
EFS checks to see whether a user-defined progress bar value is to be output for this page; if not, the number of pages already viewed will be used for the calculation.
EFS calculates the percentage for the page and saves it to the sys_progress system variable. “aria-valuemin” and “aria-valuemax” specify the minimum and maximum values for the progress bar (aria-valuemin = 0, aria-valuemax: 100).
Depending on the progress bar type, the output template will now use sys_progress as the width of the progress bar.
The message text (“You have already completed n percent of the survey”) will be read from the database, and the percentage will be dynamically inserted.
Example 1
In a test project, activate the progress bar via Standard editor → Progress bar.
Switch to Pro editor → Structure.
Choose the “layout_progressbar.tpl” template.
{strip}{* Version 3.0 2017-07-11 *}
<!-- BEGIN layout_progessbar.tpl -->
{if $LayoutSettings.progressbar == "true"}
<div class="progressbarContainer">
<div class="progressbar" role="progressbar" aria-label="{$msg_progress}" {if isset($progressbar_hidden) && $progressbar_hidden === true}style="visibility: hidden;"{/if} aria-valuemin="0" aria-valuemax="100" aria-valuenow="{$sys_progress}">
<div class="progressbar-filled" title="{$msg_progress}" style="width: {$sys_progress}%;"></div>
</div>
<div class="progressbarIndicator" {if isset($progressbar_hidden) && $progressbar_hidden === true}style="visibility: hidden;"{/if}>
<span class="hidden">Progress: </span>{$sys_progress}%
</div>
</div>
{/if}
<!-- END layout_progessbar.tpl -->
{/strip}
© 2024 Tivian XI GmbH