diff --git a/.coveragerc b/.coveragerc index c6959a4a..40a388d7 100644 --- a/.coveragerc +++ b/.coveragerc @@ -1,6 +1,10 @@ [run] relative_files = True +omit = + src/collective/volto/formsupport/tests/* + src/collective/volto/formsupport/upgrades.py + [report] include = */src/collective/* diff --git a/README.rst b/README.rst index 0986b382..2d2d5beb 100644 --- a/README.rst +++ b/README.rst @@ -313,6 +313,13 @@ This add-on can be seen in action at the following sites: - https://www.comune.modena.it/form/contatti +Storing different values from how they are displayed +========================= + +In some cases, the text that is displayed for a field on the page and in the sent email may need to be different from the value that is stored internally. For example, you may want your "Yes/ No" widget to show "Accept" and "Decline" as the labels, but internally still store `True` and `False`. + +By storing a `display_values` dictionary for each field in the block data, you can perform these mappings. + Translations ============ diff --git a/src/collective/volto/formsupport/browser/send_mail_template.pt b/src/collective/volto/formsupport/browser/send_mail_template.pt index 0eb472be..ed872114 100644 --- a/src/collective/volto/formsupport/browser/send_mail_template.pt +++ b/src/collective/volto/formsupport/browser/send_mail_template.pt @@ -9,7 +9,7 @@