5

Since powermail 6.0. it's possible to add a link in a checkbox label (for GDPR) as per the docu:

https://docs.typo3.org/typo3cms/extensions/powermail/ForAdministrators/Privacy/Index.html#add-a-link-in-a-checkbox-label.

It says:

Just use an option in your FlexForm like (with an example link to page 123 where the privacy terms are located):

I accept the <f:link.page pageUid="123">privacy terms</f:link.page> | privacy terms accepted

After that you have to enable html in labels (this feature is turned off for security reasons). Example TypoScript constants:

plugin.tx_powermail.settings.misc.htmlForLabels = 1

... yet it also says that '(this feature is turned off for security reasons)'.

What other options are there to accomplish this? (with no security loss?)

vigri
  • 475
  • 1
  • 5
  • 16
Philipp M
  • 3,306
  • 5
  • 36
  • 90

5 Answers5

3

We add a normal content element with the link above the checkbox. For example to accept the terms and conditions. Then the content element is included in the form. See https://docs.typo3.org/typo3cms/extensions/powermail/ForEditors/AddANewForm/FieldContentElement/Index.html

Heinz Schilling
  • 2,177
  • 4
  • 18
  • 35
  • ... where do I create, store and save this content element? In powermail I created a new field -> then chose Type 'Content Element' ... but what do I select? – Philipp M May 15 '18 at 18:24
  • From docu: General: If you want to show a content element within your form (text, text with image, etc...), use this field. An element browser allows you to select a tt_content record. This text is not submitted. You can create content element with list modul somewhere you want or create a page and place the content element there to select later in powermail. – Heinz Schilling May 15 '18 at 19:00
3

You can enable it in:

Template - > Constant Editor - > Powermail_Aditional - > Allow html in html fields/ Allow html in field labels

Then you can use HTML-Code. Or better:

<f:link.page pageUid="123">Privacy Policy</f:link.page>
justcasper
  • 396
  • 1
  • 17
1

1) The solution with the content element is a good thing - that should also be described

2) It's wrong that powermail version 6.0 is needed to disable the IP-storing. This feature is available for years now but 6.0 turns it off by default

3) If you trust your editors or if you already allow your editors to add content elements of type HTML it's really also no problem to allow HTML in powermail field labels for your editors

Maybe I should update the privacy documenation to clearify this points

Alex Kellner
  • 1,263
  • 6
  • 11
1

This solution appears again and again at the top of Google. But the name is edit!

here for the new Powermail Version:

plugin {
    tx_powermail {
        settings {
            misc {
                htmlForHtmlFields = 1
                htmlForLabels = 1
            }
        }
    }
}
Sebastian
  • 883
  • 11
  • 32
0

You can set link in checkbox lable or title like,

I accept the <a href="index.php?id=123">privacy terms</a>

in powermail/Resources/Private/Partials/Form/Field/Check.html

Change code

   <vh:string.RawAndRemoveXss>{setting.label}</vh:string.RawAndRemoveXss>

to

   <f:format.raw>{setting.label}</f:format.raw>
Dipak Parmar
  • 139
  • 2
  • 6
  • 1
    Just doing this will cause an XSS Auditor Error in Chrome since the label is used as checkbox value, too. But you can provide an additional value for the checkbox by using a pipe in the label: ``I accept the privacy terms | Privacy accepted`` – Paul Beck Jun 21 '18 at 08:09