Question

I am trying to get the mailer to include a rich label field from my Ploneformgen form. I have gone into the template of the mailer adapter and added this code:

<tal:block tal:content="python:request.form.get('sss-label', None)"/>

'sss-label is the name of the rich label field. This code works for displaying other items on the form, just not this one. Any ideas?

John

Was it helpful?

Solution

Only form inputs are stored in request/form, so you'll need to look this up from the field object:

<tal:block tal:content="structure context/sss-label/fgField/default" />

"fgField" is PFG's storage for an actual field inside a field context object. Rich-text fields have their label html stored in the field's default.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top