Skip to content

feat: add maximum submissions limit for forms#3199

Open
LAfricain wants to merge 37 commits intonextcloud:mainfrom
LAfricain:maxsubmissions
Open

feat: add maximum submissions limit for forms#3199
LAfricain wants to merge 37 commits intonextcloud:mainfrom
LAfricain:maxsubmissions

Conversation

@LAfricain
Copy link

Add the ability to limit the number of responses a form can receive. When the limit is reached, the form is automatically closed and displays a dedicated message instead of accepting new submissions.

  • Add max_submissions column to forms_v2_forms table (migration)
  • Add maxSubmissions property to Form entity
  • Check submission limit in FormsService::canSubmit()
  • Add limit enforcement in ApiController::newSubmission()
  • Add isMaxSubmissionsReached flag in form API response
  • Add limit settings UI in SettingsSidebarTab
  • Display dedicated 'Form is full' message in Submit view
  • Add French translations for new strings

Closes #596

Copy link
Collaborator

@Chartman123 Chartman123 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@LAfricain thanks for your PR. I just had a quick look at your code and didn't test it yet in my instance. Already a few comments. :)

@Chartman123 Chartman123 added this to the 5.3 milestone Mar 3, 2026
Copy link
Collaborator

@Chartman123 Chartman123 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some more comments :) Please have a look at the failing workflows, too.

@LAfricain
Copy link
Author

Hello @Chartman123,
I would like to know if everything is ready for a merge or if there are still some improvements to be made?
Thank you in any case for this tool!

@Chartman123
Copy link
Collaborator

@LAfricain sorry, I don't have much spare time at the moment :) Please fix the remaining workflow issues

@LAfricain
Copy link
Author

I don't have much spare time at the moment :)

It's Ok, no rush. I didn't realize I had to fix the errors myself; I still need to get used to the tool. It's done now.

@Chartman123
Copy link
Collaborator

@LAfricain yes, you have to fix them yourself (or use the npm scripts and php scripts). Environments like VSCode also can assist you with that :)

@codecov
Copy link

codecov bot commented Mar 11, 2026

Codecov Report

❌ Patch coverage is 51.85185% with 13 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
lib/Migration/Version050300Date20260303000000.php 0.00% 10 Missing ⚠️
lib/Controller/ApiController.php 66.66% 1 Missing ⚠️
lib/Service/FormsService.php 83.33% 1 Missing ⚠️
lib/Service/SubmissionService.php 83.33% 1 Missing ⚠️

📢 Thoughts on this report? Let us know!

@Chartman123
Copy link
Collaborator

@LAfricain it's getting better :) only the DCO (sign-off your commits) and OpenAPI missing... Could you then please also squash all your commits into a single one?

lafricain79 and others added 17 commits March 12, 2026 22:59
Add the ability to limit the number of responses a form can receive.
When the limit is reached, the form is automatically closed and displays
a dedicated message instead of accepting new submissions.

- Add max_submissions column to forms_v2_forms table (migration)
- Add maxSubmissions property to Form entity
- Check submission limit in FormsService::canSubmit()
- Add limit enforcement in ApiController::newSubmission()
- Add isMaxSubmissionsReached flag in form API response
- Add limit settings UI in SettingsSidebarTab
- Display dedicated 'Form is full' message in Submit view
- Add French translations for new strings

Closes nextcloud#596

Signed-off-by: lafricain79 <lafricain79@gmail.com>
Co-authored-by: Christian Hartmann <chris-hartmann@gmx.de>
Signed-off-by: L'Africain <fr.cyrille@tiberiade.be>
Signed-off-by: lafricain79 <lafricain79@gmail.com>
Co-authored-by: Christian Hartmann <chris-hartmann@gmx.de>
Signed-off-by: L'Africain <fr.cyrille@tiberiade.be>
Signed-off-by: lafricain79 <lafricain79@gmail.com>
Co-authored-by: Christian Hartmann <chris-hartmann@gmx.de>
Signed-off-by: L'Africain <fr.cyrille@tiberiade.be>
Signed-off-by: lafricain79 <lafricain79@gmail.com>
Signed-off-by: lafricain79 <lafricain79@gmail.com>
Signed-off-by: lafricain79 <lafricain79@gmail.com>
Signed-off-by: lafricain79 <lafricain79@gmail.com>
Signed-off-by: lafricain79 <lafricain79@gmail.com>
Signed-off-by: lafricain79 <lafricain79@gmail.com>
Signed-off-by: lafricain79 <lafricain79@gmail.com>
Co-authored-by: Christian Hartmann <chris-hartmann@gmx.de>
Signed-off-by: L'Africain <fr.cyrille@tiberiade.be>
Signed-off-by: lafricain79 <lafricain79@gmail.com>
Co-authored-by: Christian Hartmann <chris-hartmann@gmx.de>
Signed-off-by: L'Africain <fr.cyrille@tiberiade.be>
Signed-off-by: lafricain79 <lafricain79@gmail.com>
Co-authored-by: Christian Hartmann <chris-hartmann@gmx.de>
Signed-off-by: L'Africain <fr.cyrille@tiberiade.be>
Signed-off-by: lafricain79 <lafricain79@gmail.com>
Co-authored-by: Christian Hartmann <chris-hartmann@gmx.de>
Signed-off-by: L'Africain <fr.cyrille@tiberiade.be>
Signed-off-by: lafricain79 <lafricain79@gmail.com>
…m type

Signed-off-by: lafricain79 <lafricain79@gmail.com>
Signed-off-by: lafricain79 <lafricain79@gmail.com>
Signed-off-by: lafricain79 <lafricain79@gmail.com>
lafricain79 and others added 19 commits March 12, 2026 22:59
…Reached fields

Signed-off-by: lafricain79 <lafricain79@gmail.com>
Signed-off-by: lafricain79 <lafricain79@gmail.com>
Signed-off-by: lafricain79 <lafricain79@gmail.com>
Signed-off-by: don9x2E <revan@kakao.com>
Signed-off-by: Christian Hartmann <chris-hartmann@gmx.de>
Signed-off-by: lafricain79 <lafricain79@gmail.com>
Bumps [immutable](https://github.com/immutable-js/immutable-js) from 5.1.4 to 5.1.5.
- [Release notes](https://github.com/immutable-js/immutable-js/releases)
- [Changelog](https://github.com/immutable-js/immutable-js/blob/main/CHANGELOG.md)
- [Commits](immutable-js/immutable-js@v5.1.4...v5.1.5)

---
updated-dependencies:
- dependency-name: immutable
  dependency-version: 5.1.5
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: lafricain79 <lafricain79@gmail.com>
Signed-off-by: nfebe <fenn25.fn@gmail.com>
Signed-off-by: lafricain79 <lafricain79@gmail.com>
Bumps [dompurify](https://github.com/cure53/DOMPurify) from 3.3.1 to 3.3.2.
- [Release notes](https://github.com/cure53/DOMPurify/releases)
- [Commits](cure53/DOMPurify@3.3.1...3.3.2)

---
updated-dependencies:
- dependency-name: dompurify
  dependency-version: 3.3.2
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: lafricain79 <lafricain79@gmail.com>
Signed-off-by: Christian Hartmann <chris-hartmann@gmx.de>
Signed-off-by: lafricain79 <lafricain79@gmail.com>
Bumps [actions/setup-node](https://github.com/actions/setup-node) from 6.2.0 to 6.3.0.
- [Release notes](https://github.com/actions/setup-node/releases)
- [Commits](actions/setup-node@6044e13...53b8394)

---
updated-dependencies:
- dependency-name: actions/setup-node
  dependency-version: 6.3.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: lafricain79 <lafricain79@gmail.com>
Bumps [@vue/tsconfig](https://github.com/vuejs/tsconfig) from 0.5.1 to 0.9.0.
- [Release notes](https://github.com/vuejs/tsconfig/releases)
- [Commits](vuejs/tsconfig@v0.5.1...v0.9.0)

---
updated-dependencies:
- dependency-name: "@vue/tsconfig"
  dependency-version: 0.9.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: lafricain79 <lafricain79@gmail.com>
Bumps [phpoffice/phpspreadsheet](https://github.com/PHPOffice/PhpSpreadsheet) from 5.4.0 to 5.5.0.
- [Release notes](https://github.com/PHPOffice/PhpSpreadsheet/releases)
- [Changelog](https://github.com/PHPOffice/PhpSpreadsheet/blob/master/CHANGELOG.md)
- [Commits](PHPOffice/PhpSpreadsheet@5.4.0...5.5.0)

---
updated-dependencies:
- dependency-name: phpoffice/phpspreadsheet
  dependency-version: 5.5.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: lafricain79 <lafricain79@gmail.com>
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
Signed-off-by: lafricain79 <lafricain79@gmail.com>
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
Signed-off-by: lafricain79 <lafricain79@gmail.com>
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
Signed-off-by: lafricain79 <lafricain79@gmail.com>
This reverts commit cf200d1.

Signed-off-by: lafricain79 <lafricain79@gmail.com>
…onShort components

Signed-off-by: Christian Hartmann <chris-hartmann@gmx.de>
Signed-off-by: lafricain79 <lafricain79@gmail.com>
…issionsReached fields

Signed-off-by: lafricain79 <lafricain79@gmail.com>
Signed-off-by: lafricain79 <lafricain79@gmail.com>
@Chartman123
Copy link
Collaborator

Oh, please don't merge the main branch into this PR, always use git rebase -i main. There you can also squash the commits into a single one :)

Signed-off-by: lafricain79 <lafricain79@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Limit Number of Answers

5 participants