Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
en:create:php-filters [21.09.2019 19:12] – [A simple Filter] sarah.lahmeyeren:create:php-filters [21.09.2019 19:15] – [Using else] sarah.lahmeyer
Line 279: Line 279:
 **Tip**: Use curly brackets for every instruction block and indent the PHP-code using spaces (don't use tabs as the entry fields have problems with those). This way you won't lose the overview even if writing long passages of php. **Tip**: Use curly brackets for every instruction block and indent the PHP-code using spaces (don't use tabs as the entry fields have problems with those). This way you won't lose the overview even if writing long passages of php.
  
-Example for page 2+**Example for page 2**
 <code php> <code php>
 if (value('AB01') <= 2) { if (value('AB01') <= 2) {
Line 373: Line 373:
 The following examples will output the same page (if the questionnee has answered “no”), because following the ''goToPage()'' command, nothing will be executed. The ''goToPage()''-command leaves the current page and will never return. The following examples will output the same page (if the questionnee has answered “no”), because following the ''goToPage()'' command, nothing will be executed. The ''goToPage()''-command leaves the current page and will never return.
  
-** Jump to page “usage” if there's nothing to ask **+** Option 1: Jump to page “usage” if there's nothing to ask **
 <code php> <code php>
 if (value('TF_01') == 1) { if (value('TF_01') == 1) {
Line 397: Line 397:
  
 **Tip**: Asking some benchmark data reveals the questionee is not of interest to you? [[#screenoutfilter_unsuitable_participants|Screenout: Filter unsuitable participants]] **Tip**: Asking some benchmark data reveals the questionee is not of interest to you? [[#screenoutfilter_unsuitable_participants|Screenout: Filter unsuitable participants]]
 +
 +**Tip**: Ever since SoSci Survey Version 2.2.02 empty pages will be skipped by default. Thereby you often times don't have to worry about empty pages.
  
 ===== The right ID ===== ===== The right ID =====
en/create/php-filters.txt · Last modified: 19.03.2021 10:02 by sophia.schauer
 
Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
Driven by DokuWiki