Skip to main content

Counter integration for collective.volto.formsupport

Project description

Latest Version Egg Status Supported - Python Versions License Coverage

collective.formsupport.counter

Counter integration for collective.volto.formsupport

Features

Installation

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

[buildout]

...

eggs =
    collective.formsupport.counter

and then running bin/buildout

REST API

🔄 Reset Form Counter

Reset the counter for a specific form block.

Endpoint:

/<document>/@counter

Method:

PATCH

Parameters:

  • block_id (optional) — The identifier of the form block, if not passed, the first available formblock selected.

  • counter_value (optional) — The value to set the counter to (default: 0).

Description:

This endpoint resets the form counter to a specified value.

Request Example:

PATCH /my-document/@counter
Content-Type: application/json

{
    "block_id": "form_block_123",
    "counter_value": 5
}

Response:

  • Status Code: 204 No Content

    The response indicates that the counter has been successfully reset. No response body is returned.

📊 Get Counter Value

Retrieve the current counter value for a specific form block.

Endpoint:

/<document>/@counter

Method:

GET

Parameters:

  • block_id (optional) — The identifier of the form block. The first available is being selected if not passed.

Description:

This endpoint retrieves the current value of the form counter.

Request Example:

GET /my-document/@counter?block_id=form_block_123
Accept: application/json

Response:

  • Status Code: 200 OK

  • Response Body:

{
    "counter_value": 5
}

Authors

RedTurtle

Contributors

  • folix-01

Contribute

Support

If you are having issues, please let us know. We have a mailing list located at: info@redturtle.it

License

The project is licensed under the GPLv2.

Contributors

Changelog

1.0.4 (2025-12-11)

  • Remove not needed form_data customization and set right label for form fields. [cekk]

1.0.3 (2025-03-07)

  • collective.volto.formsupport new versions compatibility (>= 3.2.3). [folix-01]

1.0.2 (2025-02-25)

  • collective.volto.formsupport new versions compatibility. [folix-01]

1.0.1 (2025-01-10)

  • Fix counter value persistence problem. [folix-01]

1.0.0 (2025-01-09)

  • Alignments with collective.volto.formsupport. [folix-01]

1.0.0rc4 (2024-11-22)

  • Label translated [mamico]

1.0.0rc3 (2024-11-19)

  • Fix counter [mamico]

1.0.0rc2 (2024-11-15)

  • Fix manifest [mamico]

1.0.0rc1 (2024-11-13)

  • Initial release. [RedTurtle]

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

collective_formsupport_counter-1.0.4.tar.gz (23.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

collective_formsupport_counter-1.0.4-py3-none-any.whl (32.2 kB view details)

Uploaded Python 3

File details

Details for the file collective_formsupport_counter-1.0.4.tar.gz.

File metadata

File hashes

Hashes for collective_formsupport_counter-1.0.4.tar.gz
Algorithm Hash digest
SHA256 ad8be5b19558da20e5c3d82475b33497e745e5be869628290cf59c79e84a12ef
MD5 9b5076086631e41c4a3a82fa57c9551e
BLAKE2b-256 ab47f5afd2330fe531a4949f13c563d92e11e3a9e4fa2fbf2a4f66ef2f57b7c8

See more details on using hashes here.

File details

Details for the file collective_formsupport_counter-1.0.4-py3-none-any.whl.

File metadata

File hashes

Hashes for collective_formsupport_counter-1.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 83c3860bc45473d3514015c77142a8cd61bf47fb81df822ba8ed3a7e6e05da93
MD5 d5e96cf8383052678e82273264882006
BLAKE2b-256 8ea980f7d201d8de9b151a53f472b07003ce94b977f30d8c3ad48739f2007ffb

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page