Configuration 

The extension is configured on two levels:

Level Where Scope
FlexForm set in the backend, on the plugin Per plugin instance
TypoScript Configuration/TypoScript/ Per site or page tree

For every setting that exists on both levels, the FlexForm value wins over the TypoScript default. An empty FlexForm field falls back to TypoScript, and where TypoScript is empty too, to the installation's own setting. Leaving a field empty is therefore meaningful: it means "use what is configured one level up".

All TypoScript lives under plugin.tx_pnquestionnaire_questionnaire .

View paths 

Override the template paths per site package using the constants. You only need to place the files you want to override; TYPO3 merges these with the extension defaults using indexed path arrays, where index 1 overrides index 0.

plugin.tx_pnquestionnaire_questionnaire {
  view {
    templateRootPath = EXT:your_sitepackage/Resources/Private/Templates/PnQuestionnaire/
    partialRootPath  = EXT:your_sitepackage/Resources/Private/Partials/PnQuestionnaire/
    layoutRootPath   = EXT:your_sitepackage/Resources/Private/Layouts/PnQuestionnaire/
  }
}
Copied!

view.templateRootPath

view.templateRootPath
Type
string
Default
EXT:pn_questionnaire/Resources/Private/Templates/

Where the extension looks for Questionnaire/Intro.html, Question.html and Result.html. See Templates, styling and JavaScript.

view.partialRootPath

view.partialRootPath
Type
string
Default
EXT:pn_questionnaire/Resources/Private/Partials/

Where the answer type partials, the advice block, the progress bar and the button label partial are looked up.

view.layoutRootPath

view.layoutRootPath
Type
string
Default
EXT:pn_questionnaire/Resources/Private/Layouts/

Where Default.html is looked up. That layout also loads the JavaScript, so an override has to keep the asset tags or replace them.

Plugin defaults 

These settings have a FlexForm counterpart. The value here is what a plugin instance uses as long as its own field is untouched.

plugin.tx_pnquestionnaire_questionnaire.settings {
  show_score          = 0
  show_answer_summary = 0
  introduction_screen = 1
}
Copied!

settings.show_score

settings.show_score
Type
boolean
Default
0

Show the calculated score on an inline result page. Overridden by settings.show_score.

settings.show_answer_summary

settings.show_answer_summary
Type
boolean
Default
0

Show a recap of the given answers on the result page. Overridden by settings.show_answer_summary.

settings.introduction_screen

settings.introduction_screen
Type
boolean
Default
1

Show a dedicated introduction screen with a start button before the first question. Overridden by settings.introduction_screen.

What the progress bar measures 

settings.progress_mode

settings.progress_mode
Type
string
Default
completed

Two conventions are in common use for a questionnaire, and the site picks one. There is deliberately no FlexForm counterpart: this is a design decision for the whole site, and having one questionnaire count differently from the next would only confuse visitors.

completed
Counts the questions already answered, so the bar never claims to be finished while there are still answers to give, and the result page is what completes it.
position
Follows the step number, the convention many questionnaires use, at the cost of a bar that is already full on the closing question.
Value Question 1 of 5 Question 5 of 5 Result page
completed (default) 0% 80% 100%
position 20% 100% 100%

The counter above the bar reads "step X of Y" either way — that number is the visitor's position and does not change with this setting. Under completed it therefore says "step 1 of 5" next to an empty bar, which is intentional: the step is the one being answered, the bar is what lies behind it.

Stored results and mail 

Fallbacks for the fields on the Storing and mailing the result tab of the plugin. Storing and mailing themselves are switched on per plugin instance only; there is no TypoScript equivalent for the two on/off fields, by design — a site-wide default that starts writing visitor data would be the wrong default.

plugin.tx_pnquestionnaire_questionnaire.settings {
  db_save_result_storage_pid   =
  db_save_result_lifetime_days = 365
  mail_from_address            =
  mail_from_name               =
}
Copied!

settings.db_save_result_storage_pid

settings.db_save_result_storage_pid
Type
page uid
Default
(empty)

The folder stored results are written to. Empty means the plugin's own page is used, and a warning is written to the log — the FlexForm field is the intended place to set this. Overridden by settings.db_save_result_storage_pid.

settings.db_save_result_lifetime_days

settings.db_save_result_lifetime_days
Type
int
Default
365

How many days a stored result stays available. Applied when the result is stored, by writing the expires timestamp; changing it afterwards does not move existing rows. Overridden by settings.db_save_result_lifetime_days.

settings.mail_from_address

settings.mail_from_address
Type
string
Default
(empty)

Sender address of the result mail. Empty falls back to $GLOBALS['TYPO3_CONF_VARS']['MAIL']['defaultMailFromAddress'] . Overridden by settings.mail_from_address.

settings.mail_from_name

settings.mail_from_name
Type
string
Default
(empty)

Sender name of the result mail. Empty falls back to defaultMailFromName of the installation.

Domain record outcomes 

The Domain record outcome type redirects the visitor to the detail view of a record from another extension. One target can be configured per site, and it takes both TypoScript and a TCA override.

Step 1 — TypoScript 

plugin.tx_pnquestionnaire_questionnaire.settings {
  domain_record_target {
    pageUid    = 42    # UID of the page that hosts the detail plugin
    extension  = News  # Extension name (CamelCase, no vendor prefix)
    controller = News
    action     = detail
    argument   = news  # Argument name the action expects
    plugin     = Pi1   # Plugin name as registered with ExtensionUtility
  }
}
Copied!

settings.domain_record_target

settings.domain_record_target
Type
array

The single record type that may be used as a domain_record outcome. All six keys are required; the service builds the redirect URL from them with UriBuilder . Leave the whole block out when no result page uses this outcome type.

Step 2 — TCA override 

The extension ships record_uid as a plain number, because it cannot know which table your site links to. The site package names that table, and turns the field into a record browser while it is at it:

EXT:your_sitepackage/Configuration/TCA/Overrides/tx_pnquestionnaire_result_page.php
$config = &$GLOBALS['TCA']['tx_pnquestionnaire_result_page']['columns']['record_uid']['config'];
$config['type'] = 'group';
$config['allowed'] = 'tx_news_domain_model_news';
$config['foreign_table'] = 'tx_news_domain_model_news';
$config['size'] = 1;
Copied!

type and allowed give you the record browser; foreign_table is what Extbase needs to resolve the record. Both table names must match the TypoScript target — the service reads foreign_table from $GLOBALS['TCA'] at runtime, so there is a single source of truth.

Plugin settings (FlexForm) 

These live on the plugin instance, so the same questionnaire record can behave differently on different pages. The Editor Guide describes what they do in practice; the reference below names the fields.

Tab: Settings 

settings.questionnaire

settings.questionnaire
Type
record uid
Required
true

Backend label: Questionnaire.

Which questionnaire record to display. The record is looked up regardless of the folder it is stored in.

settings.introduction_screen

settings.introduction_screen
Type
boolean
Default
(from TypoScript: 1)

Backend label: Show introduction screen.

Show the introduction screen with a start button before the first question. Without it, the visitor lands on question one straight away.

settings.show_score

settings.show_score
Type
boolean
Default
(from TypoScript: 0)

Backend label: Show score on result.

Show the calculated score on an inline result page. Advice blocks with a score condition work whether or not the score is shown.

settings.show_answer_summary

settings.show_answer_summary
Type
boolean
Default
(from TypoScript: 0)

Backend label: Show answer summary.

Show a recap of the visitor's given answers on the result page.

settings.statistics_enabled

settings.statistics_enabled
Type
boolean
Default
0

Backend label: Count usage.

Keep a tally on the questionnaire record of how often it was started and completed. See Usage counters.

Tab: Button labels 

Every button the visitor sees carries a translated standard text that follows the language of the site. A field left empty keeps that standard text, which is shown as the field's placeholder — there is no need to fill in all of them.

The last two fields only have an effect once their function is switched on: the copy button belongs to the retrieval link, the send button to the mail form.

settings.button_start

settings.button_start
Type
string
Default
Start

Backend label: Start button.

Label of the button on the introduction screen.

settings.button_previous

settings.button_previous
Type
string
Default
Previous

Backend label: Previous button.

Label of the button that goes back one question.

settings.button_next

settings.button_next
Type
string
Default
Next

Backend label: Next button.

Label of the submit button on every question but the last.

settings.button_finish

settings.button_finish
Type
string
Default
Finish

Backend label: Finish button.

Label of the submit button on the last visible question.

settings.button_reset

settings.button_reset
Type
string
Default
Start over

Backend label: Start over button.

Label of the button that clears the session and returns to the start. It appears once at least one answer has been given.

settings.button_change_answers

settings.button_change_answers
Type
string
Default
Change my answers

Backend label: Change answers button.

Label of the button on the result page that returns to the questions with the given answers intact.

settings.button_mail_submit

settings.button_mail_submit
Type
string
Default
Send

Backend label: Send mail button.

Label of the submit button of the mail-to-self form.

Tab: Storing and mailing the result 

settings.db_save_result_enabled

settings.db_save_result_enabled
Type
boolean
Default
0

Backend label: Store the result.

Store the result and offer the visitor a link to return to it later. See Stored results and the result mail.

settings.db_save_result_storage_pid

settings.db_save_result_storage_pid
Type
page uid
Default
(from TypoScript, then the current page)

Backend label: Folder for the stored results.

The folder the stored results are filed in. Required as soon as storing is on.

settings.db_save_result_lifetime_days

settings.db_save_result_lifetime_days
Type
int
Default
(from TypoScript: 365)

Backend label: Keep the result for (days).

After this many days a stored result is due for removal by the purge command.

settings.mail_result_enabled

settings.mail_result_enabled
Type
boolean
Default
0

Backend label: Allow mailing the result.

Show a form on the result page where the visitor can mail the result to themselves.

settings.mail_from_address

settings.mail_from_address
Type
string
Default
(from TypoScript, then the installation)

Backend label: Sender address of the mail.

Sender address of the result mail for this plugin instance.

settings.mail_from_name

settings.mail_from_name
Type
string
Default
(from TypoScript, then the installation)

Backend label: Sender name.

Sender name of the result mail for this plugin instance.

settings.mail_intro_text

settings.mail_intro_text
Type
text
Default
(standard text)

Backend label: Opening text of the mail.

Replaces the standard opening line of the mail.

settings.mail_rate_limit_disabled

settings.mail_rate_limit_disabled
Type
boolean
Default
0

Backend label: Switch off the send limit.

Switches off the send limit of the mail form.