Sorry for the late reply, and thx for your help again!
I just tried your snippet-code, but it doesn't seem to work either:
First I created a new snippet called "EmailTextBlock" with your code above:
/* EmailTextBlock snippet */
$optionCount = 12;
$hasOption = false;
for ($i = 1; $i <= $optionCount; $i++) {
if (! empty ($modx->getPlaceholder('options' . $i))) {
$hasOption = true;
}
}
return $hasOption? $modx->getChunk('AltTextBlock') : 'xxxxx' ;
Then I added the snippet-call inside the chunk which gets used for sending the mail:
[[!EmailTextBlock]]
Then I submitted the form and received the mail, but in it there is the [[!EmailTextBlock]] within, it doesn't get "rendered".
After that I realized the line
return $hasOption? $modx->getChunk('AltTextBlock') : 'xxxxx' ;
So I thought another chunk calles "AltTextBlock" is needed. SO I created this, filled it with some "lorem ipsum" and submittet the form again; but same result, the snippet-call "[[!EmailTextBlock]]" is inside the mail that got sent.