Skip to content

Form with checkbox questions can't be submitted without 400 error #3114

@gerbsen

Description

@gerbsen

Describe the bug
I can't submit a form without an HTTP 400 Error.

To Reproduce
Steps to reproduce the behavior:

  1. Create a new form with one checkbox question (seems to be a problem too for radio and dropdown)
  2. Fill out the form
  3. Submit
  4. See error and screenshot: There was an error submitting the form: Answer "46" for question "Checkbox question" is not a valid option. (the number always changes)

Expected behavior
Each selection should be saved to XLS file without any error.

Screenshots

Image

Nextcloud (please complete the following information):

  • Nextcloud-Version: 32.0.3
  • Forms-Version: 5.2.3
  • Safari: 26.2 (but also other browsers)

Browser log

curl 'https://cloud.xxxxxxxxxx.de/ocs/v2.php/apps/forms/api/v3/forms/12/submissions' \
-X 'POST' \
-H 'Content-Type: application/json' \
-H 'Pragma: no-cache' \
-H 'Accept: application/json, text/plain, */*' \
-H 'Sec-Fetch-Site: same-origin' \
-H 'Accept-Language: en-GB,en;q=0.9' \
-H 'Cache-Control: no-cache' \
-H 'Sec-Fetch-Mode: cors' \
-H 'Accept-Encoding: gzip, deflate, br' \
-H 'Origin: https://cloud.xxxxxxxxxx.de' \
-H 'Content-Length: 40' \
-H 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/26.2 Safari/605.1.15' \
-H 'Referer: https://cloud.xxxxxxxxxx.de/apps/forms/qPiKgZk7DWi69C6s/submit' \
... // some stuff removed not sure if security relevant
--data-raw '{"answers":{"52":["46"]},"shareHash":""}'

Response:

{
    "ocs": {
        "meta": {
            "status": "failure",
            "statuscode": 400,
            "message": "Answer \"46\" for question \"Checkbox question\" is not a valid option."
        },
        "data": []
    }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    0. Needs triagePending approval or rejection. This issue is pending approval.bugSomething isn't workingneeds infoNot enough information provided

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions