collective.volto.formsupport


Namecollective.volto.formsupport JSON
Version 3.2.0 PyPI version JSON
download
home_pagehttps://github.com/collective/collective.volto.formsupport
SummaryAdd support for customizable forms in Volto
upload_time2024-11-15 14:37:33
maintainerNone
docs_urlNone
authorRedTurtle Technology
requires_python>=3.7
licenseGPL version 2
keywords python plone cms
VCS
bugtrack_url
requirements setuptools zc.buildout wheel
Travis-CI No Travis.
coveralls test coverage
            .. image:: https://img.shields.io/pypi/v/collective.volto.formsupport.svg
    :target: https://pypi.python.org/pypi/collective.volto.formsupport/
    :alt: Latest Version

.. image:: https://img.shields.io/pypi/status/collective.volto.formsupport.svg
    :target: https://pypi.python.org/pypi/collective.volto.formsupport
    :alt: Egg Status

.. image:: https://img.shields.io/pypi/pyversions/collective.volto.formsupport.svg?style=plastic
    :target: https://pypi.python.org/pypi/collective.volto.formsupport/
    :alt: Supported - Python Versions

.. image:: https://img.shields.io/pypi/l/collective.volto.formsupport.svg
    :target: https://pypi.python.org/pypi/collective.volto.formsupport/
    :alt: License

.. image:: https://coveralls.io/repos/github/collective/collective.volto.formsupport/badge.svg
    :target: https://coveralls.io/github/collective/collective.volto.formsupport
    :alt: Coverage


============================
collective.volto.formsupport
============================

Add some helper routes and functionalities for Volto sites with ``form`` blocks provided by `volto-form-block <https://github.com/collective/volto-form-block>`_ Volto plugin.

volto-form-block version
========================

Works with volto-form-block >= v3.8.0

plone.restapi endpoints
=======================

@submit-form
------------

Endpoint that the frontend should call as a submit action.

You can call it with a POST on the context where the block form is stored like this::

> curl -i -X POST http://localhost:8080/Plone/my-form/@submit-form -H 'Accept: application/json' -H 'Content-Type: application/json' --data-raw '{"block_id": "123456789", "data": [{"field_id": "foo", "value":"foo", "label": "Foo"},{"field_id": "from", "value": "support@foo.com"}, {"field_id":"name", "value": "John Doe", "label": "Name"}]}'

where:

- ``my-form`` is the context where we have a form block
- ``block_id`` is the id of the block
- ``data`` contains the submitted form data

Calling this endpoint, it will do some actions (based on block settings) and returns a ``200`` response with the submitted data.


@form-data
----------

This is an expansion component.

There is a rule that returns a ``form-data`` item into "components" slot if the user can edit the
context (**Modify portal content** permission) and there is a block that can store data.

Calling with "expand=true", this endpoint returns the stored data::

> curl -i -X GET http://localhost:8080/Plone/my-form/@form-data -H 'Accept: application/json' -H 'Content-Type: application/json' --user admin:admin

Specifying a block_id parameter returns only the records associated with a specific block on the page.

> curl -i -X GET http://localhost:8080/Plone/my-form/@form-data?block_id=123456789 -H 'Accept: application/json' -H 'Content-Type: application/json' --user admin:admin

And replies with something similar::

    {
        "@id": "http://localhost:8080/Plone/my-form/@form-data?block_id=123456789",
        "items": [
            {
            "block_id": "123456789",
            "date": "2021-03-10T12:25:24",
            "from": "support@foo.com",
            "id": 912078826,
            "name": "John Doe"
            },
            ...
        ],
        "items_total": 42,
        "expired_total": 2
    }

@form-data-export
-----------------

Returns a csv file with all data (only for users that have **Modify portal content** permission)::

> curl -i -X GET http://localhost:8080/Plone/my-form/@form-data-export -H 'Accept: application/json' -H 'Content-Type: application/json' --user admin:admin

If form fields changed between some submissions, you will see also columns related to old fields.

@form-data-clear
----------------

Reset the store (only for users that have **Modify portal content** permission)::

> curl -i -X DELETE http://localhost:8080/Plone/my-form/@form-data-clear --data-raw '{block_id: bbb}' -H 'Accept: application/json' -H 'Content-Type: application/json' --user admin:admin

Optional parameters could be passed in the payload:

* `block_id` to delete only data related to a specific block on the page, otherwise data from all form blocks on the page will be deleted
* `expired` a boolean that, if `true`, removes only records older than the value of days specified in the block configuration (the above `block_id` parameter is required)

Form actions
============

Using `volto-form-block <https://github.com/collective/volto-form-block>`_ you can set if the form submit should send data to an email address
or store it into an internal catalog (or both).

Send
----

If block is set to send data, an email with form data will be sent to the recipient set in block settings or (if not set) to the site address.

If there is an ``attachments`` field in the POST data, these files will be attached to the email sent.

XML attachments
^^^^^^^^^^^^^^^

An XML copy of the data can be optionally attached to the sent email by configuring the volto block's `attachXml` option.

The sent XML follows the same format as the feature in [collective.easyform](https://github.com/collective/collective.easyform). An example is shown below:

```xml
<?xml version='1.0' encoding='utf-8'?><form><field name="Custom field label">My value</field></form>
```

The field names in the XML will utilise the Data ID Mapping feature if it is used. Read more about this feature in the following Store section of the documentation.

Acknowledgement email
^^^^^^^^^^^^^^^^^^^^^

It is possible to also send an email to the user who filled in the form.

Set the 'Send to' value to include `acknowledgement` to enable this behaviour. The additional block field `acknowledgementMessage` can then be used to write the message being sent to the user and the `acknowledgementFields` block field used to choose the field that will contain the email address the acknowledgement will be sent to.

Store
-----

If block is set to store data, we store it into the content that has that block (with a `souper.plone <https://pypi.org/project/souper.plone>`_ catalog).

The store is an adapter registered for *IFormDataStore* interface, so you can override it easily.

Only fields that are also in block settings are stored. Missing ones will be skipped.

Each Record stores also two *service* attributes:

- **fields_labels**: a mapping of field ids to field labels. This is useful when we export csv files, so we can labels for the columns.
- **fields_order**: sorted list of field ids. This can be used in csv export to keep the order of fields.

We store these attributes because the form can change over time and we want to have a snapshot of the fields in the Record.

Data ID Mapping
^^^^^^^^^^^^^^^

The exported CSV file may need to be used by further processes which require specific values for the columns of the CSV. In such a case, the `Data ID Mapping` feature can be used to change the column name to custom text for each field.

Block serializer
================

There is a custom block serializer for type ``form``.

This serializer removes all fields that start with "\**default_**\" if the user can't edit the current context.

This is useful because we don't want to expose some internals configurations (for example the recipient email address)
to external users that should only fill the form.

If the block has a field ``captcha``, an additional property ``captcha_props`` is serialized by the ``serialize``
method provided by the ICaptchaSupport named adapter, the result contains useful metadata for the client, as the
captcha public_key, ie::

    {
        "subblocks": [
            ...
        ],
        "captcha": "recaptcha",
        "captcha_props": {
            "provider": "recaptcha",
            "public_key": "aaaaaaaaaaaaa"
        }
    }

Captcha support
===============

Captcha support requires a specific name adapter that implements ``ICaptchaSupport``.
This product contains implementations for:

- HCaptcha (plone.formwidget.hcaptcha)
- Google ReCaptcha (plone.formwidget.recaptcha)
- Custom questions and answers (collective.z3cform.norobots)
- Honeypot (collective.honeypot)


Each implementation must be included, installed and configured separately.

To include one implementation, you need to install the egg with the needed extras_require:

- collective.volto.formsupport[recaptcha]
- collective.volto.formsupport[hcaptcha]
- collective.volto.formsupport[norobots]
- collective.volto.formsupport[honeypot]

During the form post, the token captcha will be verified with the defined captcha method.

For captcha support `volto-form-block` version >= 2.4.0 is required.

Honeypot configuration
----------------------

If honeypot dependency is available in the buildout, the honeypot validation is enabled and selectable in forms.

Default field name is `protected_1` and you can change it with an environment variable. See `collective.honeypot <https://github.com/collective/collective.honeypot#id7>`_ for details.

Attachments upload limits
=========================

Forms can have one or more attachment field to allow users to upload some files.

These files will be sent via mail, so it could be a good idea setting a limit to them.
For example if you use Gmail as mail server, you can't send messages with attachments > 25MB.

There is an environment variable that you can use to set that limit (in MB)::

    [instance]
    environment-vars =
        FORM_ATTACHMENTS_LIMIT 25

By default this is not set.

The upload limit is also passed to the frontend in the form data with the `attachments_limit` key.

Content-transfer-encoding
=========================

It is possible to set the content-transfer-encoding for the email body, settings the environment
variable `MAIL_CONTENT_TRANSFER_ENCODING`::

    [instance]
    environment-vars =
        MAIL_CONTENT_TRANSFER_ENCODING base64

This is useful for some SMTP servers that have problems with `quoted-printable` encoding.

By default the content-transfer-encoding is `quoted-printable` as overridden in
https://github.com/zopefoundation/Products.MailHost/blob/master/src/Products/MailHost/MailHost.py#L65


Email subject templating
========================
You can also interpolate the form values to the email subject using the field id, in this way: ${123321123}


Header forwarding
=========================

It is possible to configure some headers from the form POST request to be included in the email's headers by configuring the `httpHeaders` field in your volto block.

[volto-formblock](https://github.com/collective/volto-form-block) allows the following headers to be forwarded:

- `HTTP_X_FORWARDED_FOR`
- `HTTP_X_FORWARDED_PORT`
- `REMOTE_ADDR`
- `PATH_INFO`
- `HTTP_USER_AGENT`
- `HTTP_REFERER`

Data retention
==============

There is a script that implements data cleansing (i.e. for GDPR purpose)::

    bin/instance -OPlone run bin/formsupport_data_cleansing  --help
    Usage: interpreter [OPTIONS]

    bin/instance -OPlone run bin/formsupport_data_cleansing [--dryrun|--no-dryrun]

    Options:
    --dryrun        --dryrun (default) simulate, --no-dryrun actually save the
                    changes

    --help          Show this message and exit.


The form block as an integer field `remove_data_after_days`, the retention days can be defined on a single block,
If the value is lower or equal to `0` there is no data cleaning for the specific form.

Examples
========

This add-on can be seen in action at the following sites:

- https://www.comune.modena.it/form/contatti


Translations
============

This product has been translated into

- Italian


Installation
============

Install collective.volto.formsupport by adding it to your buildout::

    [buildout]

    ...

    eggs =
        collective.volto.formsupport


and then running ``bin/buildout``


Contribute
==========

- Issue Tracker: https://github.com/collective/collective.volto.formsupport/issues
- Source Code: https://github.com/collective/collective.volto.formsupport


License
=======

The project is licensed under the GPLv2.

Authors
=======

This product was developed by **RedTurtle Technology** team.

.. image:: https://avatars1.githubusercontent.com/u/1087171?s=100&v=4
   :alt: RedTurtle Technology Site
   :target: https://www.redturtle.it/


Contributors
============

- RedTurtle Technology, sviluppo@redturtle.it
- Mauro Amico, mauro.amico@gmail.com

Changelog
=========

3.2.0 (2024-11-15)
------------------

- Added an adapter (`IDataAdapter`) to allow information to be added as a return value 
  to the form-data expander. This allows addons that integrate information to be added 
  rather than overwriting the expander each time.
  [mamico]

- Add FormSubmittedEvent to handle the new compiled forms.
  [folix-01]

- Add PostAdapter to predispose the customization of data handling by other add-ons.
  [folix-01]


3.1.5 (2024-10-24)
------------------

- Fix otp verification logic: do not break if otp is not in POST call
  [cekk]


3.1.4 (2024-09-27)
------------------

- Add missing collective.volto.otp include for pip environment setup
  [folix-01]

- Switchable email bcc fields OTP verification.
  [folix-01]

- Added ISO formatted strings being allowed as date inputs
  [JeffersonBledsoe]


3.1.3 (2024-09-11)
------------------

- Send messages to emails signed as 'use_as_bcc' independently from 'send' flag.
  [folix-01]

- Update Italian translations.
  [cekk]


3.1.2 (2024-08-08)
------------------

- Fix upgradestep from version.
  [folix-01]


3.1.1 (2024-08-08)
------------------

- Fix mail header and footer links.
  [folix-01]
- Plone5 compatibility in the upgradesteps
  [folix-01]
- Install otp package by upgradestep
  [folix-01]
- Maintain the fields order in email message.
  [folix-01]
- Remove otp logics (moved to collective.volto.otp)
  [folix-01]

3.1.0 (2024-07-04)
------------------

- Configurable header and footer for email message.
  [folix-01]
- Subject templating
- Handle the edge cases where the `blocks` attribute is not set.
  [mamico]
- Configuring with plone/meta
  [mamico]


3.0.2 (2024-05-05)
------------------

- Cleanup all possible HTML in user formitted data and convert it to plain text.
  [cekk]


3.0.1 (2024-04-18)
------------------

- Fix README.
  [cekk]


3.0.0 (2024-04-18)
------------------

- Add functionality to check the user inserted email by an OTP.
  [folix-01]
- Breaking change: clear data method changed from GET to DELETE
  [mamico]
- Fix: with multiple blocks on the same page, all data is deleted.
  Now, if you pass a parameter block_id, only the records related to the
  block are deleted.
  [mamico]
- Feat: clear data restapi accept a parameter for remove the expired records
  [mamico]
- data cleaning script
  [mamico]
- Allow attaching an XML version of the form data to the sent email #22
  [JeffersonBledsoe]
- Allow the IDs of fields to be customised for CSV download and XML attaachments #22
  [JeffersonBledsoe]
- Add Spanish translation.
  [macagua]
- Add German translation.
  [mbarde]
- Allow forwarding request headers in the sent emails #27
  [JeffersonBledsoe]
- Added support for sending emails as a table #31
  [JeffersonBledsoe]
- Add validation for email fields.
  [cekk]
- Better compose email message with plain and html text.
  [cekk]
- Prevent XSS applying safe_html transform to all string values passed on form.
  [cekk]
- Discard fields submitted that are not defined in form schema.
  [cekk]
- On form submit, reply with a 200 with submitted data (eventually cleaned) for confirm message.
  [cekk]
- Fix label in send_mail_template.
  [cekk]
- Prevent XSS also in send_message field.
  [cekk]

2.7.0 (2023-04-03)
------------------

- Override content-transfer-encoding using `MAIL_CONTENT_TRANSFER_ENCODING` env
  [mamico]
- The form block can now be stored in a Volto block container (columns,
  accordion, tabs, etc)
  [tiberiuichim]


2.6.2 (2022-11-07)
------------------

- Fix collective.honeypot version.
  [cekk]

2.6.1 (2022-11-07)
------------------

- Fix dependencies.
  [cekk]

2.6.0 (2022-11-07)
------------------

- Add collective.honeypot support.
  [cekk]


2.5.0 (2022-10-04)
------------------

- Add limit attachments validation. Can be configured with environment variable.
  [cekk]
- Export also compiling date in csv.
  [cekk]

2.4.0 (2022-09-08)
------------------

- Add collective.z3cform.norobots support
  [erral]

2.3.0 (2022-05-26)
------------------

- Breaking change: changed the way to store data keys. Now we use field_id as key for Records.
  [cekk]
- Fix quoting in csv export.
  [cekk]
- Generate csv columns with proper field labels, and keep the form order.
  [cekk]
- Captcha support #13.
  [mamico]


2.2.0 (2022-04-07)
------------------

- Notify an event on submit.
  [mamico]


2.1.0 (2022-03-25)
------------------

- Support for user_as_bcc field in volto-form-block: send a separate mail for each email field with that flag.
  [cekk]


2.0.3 (2021-10-25)
------------------

- Fix permission checks in serializer.
  [nzambello]


2.0.2 (2021-10-25)
------------------

- Fix permission checks.
  [cekk]


2.0.1 (2021-10-18)
------------------

- [fix] do not send attachments multiple times.
  [cekk]


2.0.0 (2021-08-19)
------------------

- Convert field types: checkbox => multiple_choice and radio => single_choice
  to follow new schema in volto-form-block (https://github.com/collective/volto-form-block/pull/7).
  [cekk]


1.0.5 (2021-05-12)
------------------

- Added Brazilian Portuguese (pt_BR) translations.
  [ericof]


1.0.4 (2021-04-15)
------------------

- Changed the classifiers inside setup.py. This should fix some installation
  issues.
  [arsenico13]


1.0.3 (2021-04-08)
------------------

- NEW: The @submit-form entry-point now takes into account if a field is "marked"
  with "use_as_reply_to" and use that field for "from" and "reply to".
  [arsenico13]


1.0.2 (2021-03-24)
------------------

- Fix form_data for anon.
  [cekk]

1.0.1 (2021-03-24)
------------------

- Fix README for pypi.
  [cekk]


1.0.0 (2021-03-24)
------------------

- Initial release.
  [cekk]

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/collective/collective.volto.formsupport",
    "name": "collective.volto.formsupport",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.7",
    "maintainer_email": null,
    "keywords": "Python Plone CMS",
    "author": "RedTurtle Technology",
    "author_email": "sviluppo@redturtle.it",
    "download_url": "https://files.pythonhosted.org/packages/ac/fb/82cd81f1f4a72f7b927ace6f0c77e4ceb5cac5dd11f1a35f05dc0bc7c143/collective_volto_formsupport-3.2.0.tar.gz",
    "platform": null,
    "description": ".. image:: https://img.shields.io/pypi/v/collective.volto.formsupport.svg\n    :target: https://pypi.python.org/pypi/collective.volto.formsupport/\n    :alt: Latest Version\n\n.. image:: https://img.shields.io/pypi/status/collective.volto.formsupport.svg\n    :target: https://pypi.python.org/pypi/collective.volto.formsupport\n    :alt: Egg Status\n\n.. image:: https://img.shields.io/pypi/pyversions/collective.volto.formsupport.svg?style=plastic\n    :target: https://pypi.python.org/pypi/collective.volto.formsupport/\n    :alt: Supported - Python Versions\n\n.. image:: https://img.shields.io/pypi/l/collective.volto.formsupport.svg\n    :target: https://pypi.python.org/pypi/collective.volto.formsupport/\n    :alt: License\n\n.. image:: https://coveralls.io/repos/github/collective/collective.volto.formsupport/badge.svg\n    :target: https://coveralls.io/github/collective/collective.volto.formsupport\n    :alt: Coverage\n\n\n============================\ncollective.volto.formsupport\n============================\n\nAdd some helper routes and functionalities for Volto sites with ``form`` blocks provided by `volto-form-block <https://github.com/collective/volto-form-block>`_ Volto plugin.\n\nvolto-form-block version\n========================\n\nWorks with volto-form-block >= v3.8.0\n\nplone.restapi endpoints\n=======================\n\n@submit-form\n------------\n\nEndpoint that the frontend should call as a submit action.\n\nYou can call it with a POST on the context where the block form is stored like this::\n\n> curl -i -X POST http://localhost:8080/Plone/my-form/@submit-form -H 'Accept: application/json' -H 'Content-Type: application/json' --data-raw '{\"block_id\": \"123456789\", \"data\": [{\"field_id\": \"foo\", \"value\":\"foo\", \"label\": \"Foo\"},{\"field_id\": \"from\", \"value\": \"support@foo.com\"}, {\"field_id\":\"name\", \"value\": \"John Doe\", \"label\": \"Name\"}]}'\n\nwhere:\n\n- ``my-form`` is the context where we have a form block\n- ``block_id`` is the id of the block\n- ``data`` contains the submitted form data\n\nCalling this endpoint, it will do some actions (based on block settings) and returns a ``200`` response with the submitted data.\n\n\n@form-data\n----------\n\nThis is an expansion component.\n\nThere is a rule that returns a ``form-data`` item into \"components\" slot if the user can edit the\ncontext (**Modify portal content** permission) and there is a block that can store data.\n\nCalling with \"expand=true\", this endpoint returns the stored data::\n\n> curl -i -X GET http://localhost:8080/Plone/my-form/@form-data -H 'Accept: application/json' -H 'Content-Type: application/json' --user admin:admin\n\nSpecifying a block_id parameter returns only the records associated with a specific block on the page.\n\n> curl -i -X GET http://localhost:8080/Plone/my-form/@form-data?block_id=123456789 -H 'Accept: application/json' -H 'Content-Type: application/json' --user admin:admin\n\nAnd replies with something similar::\n\n    {\n        \"@id\": \"http://localhost:8080/Plone/my-form/@form-data?block_id=123456789\",\n        \"items\": [\n            {\n            \"block_id\": \"123456789\",\n            \"date\": \"2021-03-10T12:25:24\",\n            \"from\": \"support@foo.com\",\n            \"id\": 912078826,\n            \"name\": \"John Doe\"\n            },\n            ...\n        ],\n        \"items_total\": 42,\n        \"expired_total\": 2\n    }\n\n@form-data-export\n-----------------\n\nReturns a csv file with all data (only for users that have **Modify portal content** permission)::\n\n> curl -i -X GET http://localhost:8080/Plone/my-form/@form-data-export -H 'Accept: application/json' -H 'Content-Type: application/json' --user admin:admin\n\nIf form fields changed between some submissions, you will see also columns related to old fields.\n\n@form-data-clear\n----------------\n\nReset the store (only for users that have **Modify portal content** permission)::\n\n> curl -i -X DELETE http://localhost:8080/Plone/my-form/@form-data-clear --data-raw '{block_id: bbb}' -H 'Accept: application/json' -H 'Content-Type: application/json' --user admin:admin\n\nOptional parameters could be passed in the payload:\n\n* `block_id` to delete only data related to a specific block on the page, otherwise data from all form blocks on the page will be deleted\n* `expired` a boolean that, if `true`, removes only records older than the value of days specified in the block configuration (the above `block_id` parameter is required)\n\nForm actions\n============\n\nUsing `volto-form-block <https://github.com/collective/volto-form-block>`_ you can set if the form submit should send data to an email address\nor store it into an internal catalog (or both).\n\nSend\n----\n\nIf block is set to send data, an email with form data will be sent to the recipient set in block settings or (if not set) to the site address.\n\nIf there is an ``attachments`` field in the POST data, these files will be attached to the email sent.\n\nXML attachments\n^^^^^^^^^^^^^^^\n\nAn XML copy of the data can be optionally attached to the sent email by configuring the volto block's `attachXml` option.\n\nThe sent XML follows the same format as the feature in [collective.easyform](https://github.com/collective/collective.easyform). An example is shown below:\n\n```xml\n<?xml version='1.0' encoding='utf-8'?><form><field name=\"Custom field label\">My value</field></form>\n```\n\nThe field names in the XML will utilise the Data ID Mapping feature if it is used. Read more about this feature in the following Store section of the documentation.\n\nAcknowledgement email\n^^^^^^^^^^^^^^^^^^^^^\n\nIt is possible to also send an email to the user who filled in the form.\n\nSet the 'Send to' value to include `acknowledgement` to enable this behaviour. The additional block field `acknowledgementMessage` can then be used to write the message being sent to the user and the `acknowledgementFields` block field used to choose the field that will contain the email address the acknowledgement will be sent to.\n\nStore\n-----\n\nIf block is set to store data, we store it into the content that has that block (with a `souper.plone <https://pypi.org/project/souper.plone>`_ catalog).\n\nThe store is an adapter registered for *IFormDataStore* interface, so you can override it easily.\n\nOnly fields that are also in block settings are stored. Missing ones will be skipped.\n\nEach Record stores also two *service* attributes:\n\n- **fields_labels**: a mapping of field ids to field labels. This is useful when we export csv files, so we can labels for the columns.\n- **fields_order**: sorted list of field ids. This can be used in csv export to keep the order of fields.\n\nWe store these attributes because the form can change over time and we want to have a snapshot of the fields in the Record.\n\nData ID Mapping\n^^^^^^^^^^^^^^^\n\nThe exported CSV file may need to be used by further processes which require specific values for the columns of the CSV. In such a case, the `Data ID Mapping` feature can be used to change the column name to custom text for each field.\n\nBlock serializer\n================\n\nThere is a custom block serializer for type ``form``.\n\nThis serializer removes all fields that start with \"\\**default_**\\\" if the user can't edit the current context.\n\nThis is useful because we don't want to expose some internals configurations (for example the recipient email address)\nto external users that should only fill the form.\n\nIf the block has a field ``captcha``, an additional property ``captcha_props`` is serialized by the ``serialize``\nmethod provided by the ICaptchaSupport named adapter, the result contains useful metadata for the client, as the\ncaptcha public_key, ie::\n\n    {\n        \"subblocks\": [\n            ...\n        ],\n        \"captcha\": \"recaptcha\",\n        \"captcha_props\": {\n            \"provider\": \"recaptcha\",\n            \"public_key\": \"aaaaaaaaaaaaa\"\n        }\n    }\n\nCaptcha support\n===============\n\nCaptcha support requires a specific name adapter that implements ``ICaptchaSupport``.\nThis product contains implementations for:\n\n- HCaptcha (plone.formwidget.hcaptcha)\n- Google ReCaptcha (plone.formwidget.recaptcha)\n- Custom questions and answers (collective.z3cform.norobots)\n- Honeypot (collective.honeypot)\n\n\nEach implementation must be included, installed and configured separately.\n\nTo include one implementation, you need to install the egg with the needed extras_require:\n\n- collective.volto.formsupport[recaptcha]\n- collective.volto.formsupport[hcaptcha]\n- collective.volto.formsupport[norobots]\n- collective.volto.formsupport[honeypot]\n\nDuring the form post, the token captcha will be verified with the defined captcha method.\n\nFor captcha support `volto-form-block` version >= 2.4.0 is required.\n\nHoneypot configuration\n----------------------\n\nIf honeypot dependency is available in the buildout, the honeypot validation is enabled and selectable in forms.\n\nDefault field name is `protected_1` and you can change it with an environment variable. See `collective.honeypot <https://github.com/collective/collective.honeypot#id7>`_ for details.\n\nAttachments upload limits\n=========================\n\nForms can have one or more attachment field to allow users to upload some files.\n\nThese files will be sent via mail, so it could be a good idea setting a limit to them.\nFor example if you use Gmail as mail server, you can't send messages with attachments > 25MB.\n\nThere is an environment variable that you can use to set that limit (in MB)::\n\n    [instance]\n    environment-vars =\n        FORM_ATTACHMENTS_LIMIT 25\n\nBy default this is not set.\n\nThe upload limit is also passed to the frontend in the form data with the `attachments_limit` key.\n\nContent-transfer-encoding\n=========================\n\nIt is possible to set the content-transfer-encoding for the email body, settings the environment\nvariable `MAIL_CONTENT_TRANSFER_ENCODING`::\n\n    [instance]\n    environment-vars =\n        MAIL_CONTENT_TRANSFER_ENCODING base64\n\nThis is useful for some SMTP servers that have problems with `quoted-printable` encoding.\n\nBy default the content-transfer-encoding is `quoted-printable` as overridden in\nhttps://github.com/zopefoundation/Products.MailHost/blob/master/src/Products/MailHost/MailHost.py#L65\n\n\nEmail subject templating\n========================\nYou can also interpolate the form values to the email subject using the field id, in this way: ${123321123}\n\n\nHeader forwarding\n=========================\n\nIt is possible to configure some headers from the form POST request to be included in the email's headers by configuring the `httpHeaders` field in your volto block.\n\n[volto-formblock](https://github.com/collective/volto-form-block) allows the following headers to be forwarded:\n\n- `HTTP_X_FORWARDED_FOR`\n- `HTTP_X_FORWARDED_PORT`\n- `REMOTE_ADDR`\n- `PATH_INFO`\n- `HTTP_USER_AGENT`\n- `HTTP_REFERER`\n\nData retention\n==============\n\nThere is a script that implements data cleansing (i.e. for GDPR purpose)::\n\n    bin/instance -OPlone run bin/formsupport_data_cleansing  --help\n    Usage: interpreter [OPTIONS]\n\n    bin/instance -OPlone run bin/formsupport_data_cleansing [--dryrun|--no-dryrun]\n\n    Options:\n    --dryrun        --dryrun (default) simulate, --no-dryrun actually save the\n                    changes\n\n    --help          Show this message and exit.\n\n\nThe form block as an integer field `remove_data_after_days`, the retention days can be defined on a single block,\nIf the value is lower or equal to `0` there is no data cleaning for the specific form.\n\nExamples\n========\n\nThis add-on can be seen in action at the following sites:\n\n- https://www.comune.modena.it/form/contatti\n\n\nTranslations\n============\n\nThis product has been translated into\n\n- Italian\n\n\nInstallation\n============\n\nInstall collective.volto.formsupport by adding it to your buildout::\n\n    [buildout]\n\n    ...\n\n    eggs =\n        collective.volto.formsupport\n\n\nand then running ``bin/buildout``\n\n\nContribute\n==========\n\n- Issue Tracker: https://github.com/collective/collective.volto.formsupport/issues\n- Source Code: https://github.com/collective/collective.volto.formsupport\n\n\nLicense\n=======\n\nThe project is licensed under the GPLv2.\n\nAuthors\n=======\n\nThis product was developed by **RedTurtle Technology** team.\n\n.. image:: https://avatars1.githubusercontent.com/u/1087171?s=100&v=4\n   :alt: RedTurtle Technology Site\n   :target: https://www.redturtle.it/\n\n\nContributors\n============\n\n- RedTurtle Technology, sviluppo@redturtle.it\n- Mauro Amico, mauro.amico@gmail.com\n\nChangelog\n=========\n\n3.2.0 (2024-11-15)\n------------------\n\n- Added an adapter (`IDataAdapter`) to allow information to be added as a return value \n  to the form-data expander. This allows addons that integrate information to be added \n  rather than overwriting the expander each time.\n  [mamico]\n\n- Add FormSubmittedEvent to handle the new compiled forms.\n  [folix-01]\n\n- Add PostAdapter to predispose the customization of data handling by other add-ons.\n  [folix-01]\n\n\n3.1.5 (2024-10-24)\n------------------\n\n- Fix otp verification logic: do not break if otp is not in POST call\n  [cekk]\n\n\n3.1.4 (2024-09-27)\n------------------\n\n- Add missing collective.volto.otp include for pip environment setup\n  [folix-01]\n\n- Switchable email bcc fields OTP verification.\n  [folix-01]\n\n- Added ISO formatted strings being allowed as date inputs\n  [JeffersonBledsoe]\n\n\n3.1.3 (2024-09-11)\n------------------\n\n- Send messages to emails signed as 'use_as_bcc' independently from 'send' flag.\n  [folix-01]\n\n- Update Italian translations.\n  [cekk]\n\n\n3.1.2 (2024-08-08)\n------------------\n\n- Fix upgradestep from version.\n  [folix-01]\n\n\n3.1.1 (2024-08-08)\n------------------\n\n- Fix mail header and footer links.\n  [folix-01]\n- Plone5 compatibility in the upgradesteps\n  [folix-01]\n- Install otp package by upgradestep\n  [folix-01]\n- Maintain the fields order in email message.\n  [folix-01]\n- Remove otp logics (moved to collective.volto.otp)\n  [folix-01]\n\n3.1.0 (2024-07-04)\n------------------\n\n- Configurable header and footer for email message.\n  [folix-01]\n- Subject templating\n- Handle the edge cases where the `blocks` attribute is not set.\n  [mamico]\n- Configuring with plone/meta\n  [mamico]\n\n\n3.0.2 (2024-05-05)\n------------------\n\n- Cleanup all possible HTML in user formitted data and convert it to plain text.\n  [cekk]\n\n\n3.0.1 (2024-04-18)\n------------------\n\n- Fix README.\n  [cekk]\n\n\n3.0.0 (2024-04-18)\n------------------\n\n- Add functionality to check the user inserted email by an OTP.\n  [folix-01]\n- Breaking change: clear data method changed from GET to DELETE\n  [mamico]\n- Fix: with multiple blocks on the same page, all data is deleted.\n  Now, if you pass a parameter block_id, only the records related to the\n  block are deleted.\n  [mamico]\n- Feat: clear data restapi accept a parameter for remove the expired records\n  [mamico]\n- data cleaning script\n  [mamico]\n- Allow attaching an XML version of the form data to the sent email #22\n  [JeffersonBledsoe]\n- Allow the IDs of fields to be customised for CSV download and XML attaachments #22\n  [JeffersonBledsoe]\n- Add Spanish translation.\n  [macagua]\n- Add German translation.\n  [mbarde]\n- Allow forwarding request headers in the sent emails #27\n  [JeffersonBledsoe]\n- Added support for sending emails as a table #31\n  [JeffersonBledsoe]\n- Add validation for email fields.\n  [cekk]\n- Better compose email message with plain and html text.\n  [cekk]\n- Prevent XSS applying safe_html transform to all string values passed on form.\n  [cekk]\n- Discard fields submitted that are not defined in form schema.\n  [cekk]\n- On form submit, reply with a 200 with submitted data (eventually cleaned) for confirm message.\n  [cekk]\n- Fix label in send_mail_template.\n  [cekk]\n- Prevent XSS also in send_message field.\n  [cekk]\n\n2.7.0 (2023-04-03)\n------------------\n\n- Override content-transfer-encoding using `MAIL_CONTENT_TRANSFER_ENCODING` env\n  [mamico]\n- The form block can now be stored in a Volto block container (columns,\n  accordion, tabs, etc)\n  [tiberiuichim]\n\n\n2.6.2 (2022-11-07)\n------------------\n\n- Fix collective.honeypot version.\n  [cekk]\n\n2.6.1 (2022-11-07)\n------------------\n\n- Fix dependencies.\n  [cekk]\n\n2.6.0 (2022-11-07)\n------------------\n\n- Add collective.honeypot support.\n  [cekk]\n\n\n2.5.0 (2022-10-04)\n------------------\n\n- Add limit attachments validation. Can be configured with environment variable.\n  [cekk]\n- Export also compiling date in csv.\n  [cekk]\n\n2.4.0 (2022-09-08)\n------------------\n\n- Add collective.z3cform.norobots support\n  [erral]\n\n2.3.0 (2022-05-26)\n------------------\n\n- Breaking change: changed the way to store data keys. Now we use field_id as key for Records.\n  [cekk]\n- Fix quoting in csv export.\n  [cekk]\n- Generate csv columns with proper field labels, and keep the form order.\n  [cekk]\n- Captcha support #13.\n  [mamico]\n\n\n2.2.0 (2022-04-07)\n------------------\n\n- Notify an event on submit.\n  [mamico]\n\n\n2.1.0 (2022-03-25)\n------------------\n\n- Support for user_as_bcc field in volto-form-block: send a separate mail for each email field with that flag.\n  [cekk]\n\n\n2.0.3 (2021-10-25)\n------------------\n\n- Fix permission checks in serializer.\n  [nzambello]\n\n\n2.0.2 (2021-10-25)\n------------------\n\n- Fix permission checks.\n  [cekk]\n\n\n2.0.1 (2021-10-18)\n------------------\n\n- [fix] do not send attachments multiple times.\n  [cekk]\n\n\n2.0.0 (2021-08-19)\n------------------\n\n- Convert field types: checkbox => multiple_choice and radio => single_choice\n  to follow new schema in volto-form-block (https://github.com/collective/volto-form-block/pull/7).\n  [cekk]\n\n\n1.0.5 (2021-05-12)\n------------------\n\n- Added Brazilian Portuguese (pt_BR) translations.\n  [ericof]\n\n\n1.0.4 (2021-04-15)\n------------------\n\n- Changed the classifiers inside setup.py. This should fix some installation\n  issues.\n  [arsenico13]\n\n\n1.0.3 (2021-04-08)\n------------------\n\n- NEW: The @submit-form entry-point now takes into account if a field is \"marked\"\n  with \"use_as_reply_to\" and use that field for \"from\" and \"reply to\".\n  [arsenico13]\n\n\n1.0.2 (2021-03-24)\n------------------\n\n- Fix form_data for anon.\n  [cekk]\n\n1.0.1 (2021-03-24)\n------------------\n\n- Fix README for pypi.\n  [cekk]\n\n\n1.0.0 (2021-03-24)\n------------------\n\n- Initial release.\n  [cekk]\n",
    "bugtrack_url": null,
    "license": "GPL version 2",
    "summary": "Add support for customizable forms in Volto",
    "version": "3.2.0",
    "project_urls": {
        "Homepage": "https://github.com/collective/collective.volto.formsupport",
        "PyPI": "https://pypi.python.org/pypi/collective.volto.formsupport",
        "Source": "https://github.com/collective/collective.volto.formsupport",
        "Tracker": "https://github.com/collective/collective.volto.formsupport/issues"
    },
    "split_keywords": [
        "python",
        "plone",
        "cms"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "bf837c0604eba31c713e06917caf52105eeb418bc00eda02304bdd631ad7b656",
                "md5": "02950e439104bc8c645fa7ca3bcbe206",
                "sha256": "fae263eeaf7a95cf33f5bfa683a8f4a69ca0f1c8f5afa2e99360a0817121b0ac"
            },
            "downloads": -1,
            "filename": "collective.volto.formsupport-3.2.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "02950e439104bc8c645fa7ca3bcbe206",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7",
            "size": 150150,
            "upload_time": "2024-11-15T14:37:31",
            "upload_time_iso_8601": "2024-11-15T14:37:31.215492Z",
            "url": "https://files.pythonhosted.org/packages/bf/83/7c0604eba31c713e06917caf52105eeb418bc00eda02304bdd631ad7b656/collective.volto.formsupport-3.2.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "acfb82cd81f1f4a72f7b927ace6f0c77e4ceb5cac5dd11f1a35f05dc0bc7c143",
                "md5": "1852c4117e3e93ce1ab3be2fdea32983",
                "sha256": "f95c4ff3746f7c731329a32235805287b4e3c01de4861bbf4ba5a360d18ccd9a"
            },
            "downloads": -1,
            "filename": "collective_volto_formsupport-3.2.0.tar.gz",
            "has_sig": false,
            "md5_digest": "1852c4117e3e93ce1ab3be2fdea32983",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7",
            "size": 134452,
            "upload_time": "2024-11-15T14:37:33",
            "upload_time_iso_8601": "2024-11-15T14:37:33.883600Z",
            "url": "https://files.pythonhosted.org/packages/ac/fb/82cd81f1f4a72f7b927ace6f0c77e4ceb5cac5dd11f1a35f05dc0bc7c143/collective_volto_formsupport-3.2.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-11-15 14:37:33",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "collective",
    "github_project": "collective.volto.formsupport",
    "travis_ci": false,
    "coveralls": true,
    "github_actions": true,
    "requirements": [
        {
            "name": "setuptools",
            "specs": []
        },
        {
            "name": "zc.buildout",
            "specs": []
        },
        {
            "name": "wheel",
            "specs": []
        }
    ],
    "tox": true,
    "lcname": "collective.volto.formsupport"
}
        
Elapsed time: 0.72846s