Differences

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

Link to this comparison view

Both sides previous revision Previous revision
en:create:php [06.06.2017 13:26]
admin [Variables]
en:create:php [15.04.2020 20:28] (current)
admin
Line 4: Line 4:
  
 This chapter tries to give a short introduction to using PHP. Not so much a broad 101 to programming PHP, but more the basics you need for advanced questionnaires and filters. This chapter tries to give a short introduction to using PHP. Not so much a broad 101 to programming PHP, but more the basics you need for advanced questionnaires and filters.
 +
 +**Tip:** [[https://www.soscisurvey.de/homepage/index.php?id=screencast#extra|Video Tutorial on PHP Code]]
  
 ===== Using PHP code in the questionnaire ===== ===== Using PHP code in the questionnaire =====
  
 To use PHP in the questionnaire, you need to **compose a questionnaire** first. If one is open, ready for editing, you'll see the pages at the top, the current questionnaire page on the left, and the building blocks for the questionnaire on the right: questions, text blocks, etc. To use PHP in the questionnaire, you need to **compose a questionnaire** first. If one is open, ready for editing, you'll see the pages at the top, the current questionnaire page on the left, and the building blocks for the questionnaire on the right: questions, text blocks, etc.
 +
 One of those building blocks is the block "PHP-Code". You can drag-and-drop it into the questionnaire page, just like the questions and text blocks. One of those building blocks is the block "PHP-Code". You can drag-and-drop it into the questionnaire page, just like the questions and text blocks.
  
Line 13: Line 16:
  
 After inserting the //PHP-Code//-element into the page, you will see a text entry field that will accept PHP-code. After inserting the //PHP-Code//-element into the page, you will see a text entry field that will accept PHP-code.
 +
 +**Note:** The PHP code will be executed as soon as the page is reached during filling out the questionnaire, or if the page is run in the preview.
 +
  
 ===== Comfortable programming (questions and texts) ===== ===== Comfortable programming (questions and texts) =====
en/create/php.txt · Last modified: 15.04.2020 20:28 by admin
 
Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
Driven by DokuWiki