Skip to content

collective/collective.formsupport.counter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

45 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

No description, website, or topics provided.

Resources

License

GPL-2.0, Unknown licenses found

Licenses found

GPL-2.0
LICENSE.GPL
Unknown
LICENSE.rst

Stars

Watchers

Forks

Packages

No packages published