You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: backend/README.md
+20-29Lines changed: 20 additions & 29 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
# collective.volto.formsupport
2
2
3
-
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.
3
+
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.
4
4
5
5
## volto-form-block version
6
6
@@ -15,7 +15,7 @@ Endpoint that the frontend should call as a submit action.
15
15
You can call it with a POST on the context where the block form is stored like this:
Calling this endpoint, it will do some actions (based on block settings) and returns a `200` response with the submitted data.
28
28
29
-
30
29
### `@form-data`
31
30
32
31
This is an expansion component.
@@ -86,8 +85,8 @@ Reset the store (only for users that have **Modify portal content** permission):
86
85
87
86
Optional parameters could be passed in the payload:
88
87
89
-
*`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
90
-
*`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)
88
+
-`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
89
+
-`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)
91
90
92
91
### `@validate-email-address`
93
92
@@ -100,8 +99,8 @@ Returns a HTTP 204 in case of success or HTTP 400 in case the email is badly com
100
99
101
100
parameters:
102
101
103
-
*`email` email address.
104
-
*`uid` uid related to email field
102
+
-`email` email address.
103
+
-`uid` uid related to email field
105
104
106
105
### `@validate-email-token`
107
106
@@ -114,13 +113,13 @@ Returns HTTP 204 in case of success or HTTP 400 in case of failure ::
114
113
115
114
parameters:
116
115
117
-
*`email` email address
118
-
*`uid` uid used to generate the OTP
119
-
*`otp` OTP code
116
+
-`email` email address
117
+
-`uid` uid used to generate the OTP
118
+
-`otp` OTP code
120
119
121
120
## Form actions
122
121
123
-
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
122
+
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
124
123
or store it into an internal catalog (or both).
125
124
126
125
### Send
@@ -149,13 +148,13 @@ Set the 'Send to' value to include `acknowledgement` to enable this behaviour. T
149
148
150
149
### Store
151
150
152
-
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).
151
+
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).
153
152
154
-
The store is an adapter registered for *IFormDataStore* interface, so you can override it easily.
153
+
The store is an adapter registered for _IFormDataStore_ interface, so you can override it easily.
155
154
156
155
Only fields that are also in block settings are stored. Missing ones will be skipped.
157
156
158
-
Each Record stores also two *service* attributes:
157
+
Each Record stores also two _service_ attributes:
159
158
160
159
-**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.
161
160
-**fields_order**: sorted list of field ids. This can be used in csv export to keep the order of fields.
@@ -168,14 +167,14 @@ The exported CSV file may need to be used by further processes which require spe
168
167
169
168
## Block serializer
170
169
171
-
There is a custom block serializer for type ``form``.
170
+
There is a custom block serializer for type `form`.
172
171
173
-
This serializer removes all fields that start with "\**default_**\" if the user can't edit the current context.
172
+
This serializer removes all fields that start with "\*\*default\_\*\*\" if the user can't edit the current context.
174
173
175
174
This is useful because we don't want to expose some internals configurations (for example the recipient email address)
176
175
to external users that should only fill the form.
177
176
178
-
If the block has a field ``captcha``, an additional property ``captcha_props`` is serialized by the ``serialize``
177
+
If the block has a field `captcha`, an additional property `captcha_props` is serialized by the `serialize`
179
178
method provided by the ICaptchaSupport named adapter, the result contains useful metadata for the client, as the
180
179
captcha public_key, ie:
181
180
@@ -202,7 +201,6 @@ This product contains implementations for:
202
201
- Custom questions and answers (collective.z3cform.norobots)
203
202
- Honeypot (collective.honeypot)
204
203
205
-
206
204
Each implementation must be included, installed and configured separately.
207
205
208
206
To include one implementation, you need to install the egg with the needed extras_require:
@@ -220,7 +218,7 @@ For captcha support `volto-form-block` version >= 2.4.0 is required.
220
218
221
219
If honeypot dependency is available in the buildout, the honeypot validation is enabled and selectable in forms.
222
220
223
-
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.
221
+
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.
224
222
225
223
## Attachments upload limits
226
224
@@ -257,12 +255,10 @@ This is useful for some SMTP servers that have problems with `quoted-printable`
257
255
By default the content-transfer-encoding is `quoted-printable` as overridden in
You can also interpolate the form values to the email subject using the field id, in this way: ${123321123}
264
261
265
-
266
262
## Header forwarding
267
263
268
264
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.
@@ -302,14 +298,12 @@ This add-on can be seen in action at the following sites:
302
298
303
299
-https://www.comune.modena.it/form/contatti
304
300
305
-
306
301
## Translations
307
302
308
303
This product has been translated into
309
304
310
305
- Italian
311
306
312
-
313
307
## Installation
314
308
315
309
Install collective.volto.formsupport by adding it to your buildout::
@@ -323,15 +317,13 @@ Install collective.volto.formsupport by adding it to your buildout::
0 commit comments