Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
Framaforms
Framaforms
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 38
    • Issues 38
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge Requests 1
    • Merge Requests 1
  • Operations
    • Operations
    • Incidents
  • Analytics
    • Analytics
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
  • Framasoft
  • FramaformsFramaforms
  • Merge Requests
  • !126

Merged
Opened Nov 27, 2020 by theo lem@theo1🐸Maintainer3 of 3 tasks completed3/3 tasks

Submission per form limit

  • Overview 10
  • Commits 21
  • Changes 3

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 Dec 08, 2020 by theo lem
Assignee
Assign to
Reviewer
Request review from
v2.0
Milestone
v2.0
Assign milestone
Time tracking
Reference: framasoft/framaforms!126
Source branch: submission-per-form-limit

Revert this merge request

This will create a new commit in order to revert the existing changes.

Switch branch
Cancel
A new branch will be created in your fork and a new merge request will be started.

Cherry-pick this merge request

Switch branch
Cancel
A new branch will be created in your fork and a new merge request will be started.