Skip to content

Submission per form limit

theo lem requested to merge submission-per-form-limit into master

Closes #116 (closed)

Overview

Context

The limit of submissions per form is announced in Framaforms, but isn't implemented yet (see #116 (closed)).

What is the feature?

A site-wide number of submissions per form should be limited : no more than this number of submissions per form should be allowed. If the maximum number of submissions per form is reached, it should be impossible to submit the form.

If the user has set a custom submission limit for their form, this should be taken into account above the side-wide limit.

What is the solution?

  • Checks should be performed on form access using hook_form_alter to display messages when limit is almost reached.
  • Tokens related to submission limits are implemented.

What areas of the site does it impact?

All changes are made to the framaforms. This MR performs a new check on form access to display appropriate messages on form access.

New tokens are introduced.

TODO

  • Forbid form submission when the limit is reached
  • Display appropriate messages when the limit is almost reached / reached, for both site-wide and user-defined limits.
  • Display message only on main page, not on edit pages.
Edited by theo lem

Merge request reports