I haven't been able to locate any examples of override TAL expressions for the PFG mailer adapter. I'd like to have the subject of the email be:
"New sponsor: " + here/organization-name
but I don't see a way to concatenate using non-python:
TAL and
python: "New sponsor: " + here['organization-name']
results in TypeError: cannot concatenate 'str' and 'Acquisition.ImplicitAcquisitionWrapper' objects
because the latter expression is actually an FGStringField, and
python: "New sponsor: " + (here['organization-name'])()
results in
Module Products.PloneFormGen.content.thanksPage, line 233, in displayInputs
AttributeError: _getFieldObjects
- Expression: "python:here.displayInputs(request)"
- Filename: ... ormGen/skins/PloneFormGen/fg_thankspage_embedded_view.pt
- Location: (line 13: col 39)
- Source: ... :define="fields python:here.displayInputs(request)"
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
- Arguments: repeat: {...} (0)
template: <ImplicitAcquisitionWrapper fg_thankspage_view_p3 at 0x7ffb0bbca4b0>
modules: <instance - at 0x7ffb2a8f2fc8>
here: <ImplicitAcquisitionWrapper thank-you at 0x7ffb0bbcae60>
user: <ImplicitAcquisitionWrapper - at 0x7ffb0bb04190>
nothing: <NoneType - at 0x91a870>
container: <ImplicitAcquisitionWrapper thank-you at 0x7ffb0bbcae60>
default: <object - at 0x7ffb32d10590>
request: <instance - at 0x7ffb0ac06170>
wrapped_repeat: <SafeMapping - at 0x7ffb0ac33af8>
traverse_subpath: <list - at 0x7ffb0a0b05a8>
loop: {...} (0)
context: <ImplicitAcquisitionWrapper thank-you at 0x7ffb0bbcae60>
translate: <function translate at 0x7ffb0a61c0c8>
root: <ImplicitAcquisitionWrapper Zope at 0x7ffb12227910>
options: {...} (1)
target_language: <NoneType - at 0x91a870>
Even the very simple expression here/organization-name
results in the same error stack trace.
When I stepped through displayInputs
it seems that self
is the string field instead of (when there is no override expression) being the form folder.