forms icon indicating copy to clipboard operation
forms copied to clipboard

Display question ID in the Forms UI for easier Windmill automation

Open ericfischereu opened this issue 7 months ago • 6 comments

Nextcloud (please complete the following information):

  • Nextcloud-Version: 31
  • Forms-Version:

Is your feature request related to a problem? Please describe. When using Windmill, getting answers from a from submission is only working by querying the question ID. The ID however is not visible in the form.

Describe the solution you'd like Similar to tables: When editing a column, there's an info icon displaying table and column id. The same should be implemented in Forms: Through the "three dot menu" of a question the question ID should be visible.

Describe alternatives you've considered It's possible to set a technical name for each question. This however is not returned by the API. If the technical name would be available in the API response, the ID would be obsolete.

Additional context Example output of /ocs/v2.php/apps/forms/api/v3/forms/{formId}/submissions

{
    "submission": {
        "id": 27,
        "formId": 3,
        "userId": "admin",
        "answers": [
            {
                "id": 105,
                "text": "Laptop",
                "fileId": null,
                "questionId": 7,
                "submissionId": 27
            },
            {
                "id": 106,
                "text": "Super Laptop 5",
                "fileId": null,
                "questionId": 8,
                "submissionId": 27
            }
        ],
        "timestamp": 1744785175,
        "userDisplayName": "admin"
    }
}

ericfischereu avatar Apr 16 '25 06:04 ericfischereu

@ericfischereu you can get the required information by querying the other endpoints of our API. Especially the GET /api/v3/forms/{formId} where you can find all the information related to that form

Chartman123 avatar Apr 16 '25 06:04 Chartman123

@Chartman123 Or by just running a workflow once, then you see the what's sent. But that's not really user friendly, we're talking about a Low-Code automation solution. I don't think that we can expect from non developers to call endpoints without a template (right now there's not script for getting form information).

Just make it clear: there are solutions for this, but it's not really user friendly. Taking into account that this should be simple to implement, I think it's worth it. But it's also hot a high priority task of course.

ericfischereu avatar Apr 16 '25 07:04 ericfischereu

Ok, and where did you get the formId from in the first place?

Chartman123 avatar Apr 16 '25 11:04 Chartman123

We should rather use the technical name for that. Thats exactly what it is there for.

susnux avatar Apr 17 '25 14:04 susnux

But we don't need the technical question name in the submissions endpoint ourselves and it's available through the other endpoints. I don't think that we should extend our API for some third-party tools. Especially if we don't know anything about the use case.

@ericfischereu please explain in detail what you're trying to do. A screen recording could also help to fully understand your feature request.

Chartman123 avatar Apr 17 '25 14:04 Chartman123

I have a workflow, which takes form submissions and writes data into a table.

Image

There I'm using our default "Get a form submission from Nextcloud Forms" script, which calls client.GET("/ocs/v2.php/apps/forms/api/v3/forms/{formId}/submissions"

Now to get the data from the form submission, I have to do something like this in Windmill:

Image

Without knowing the questionId, it's basically just guessing based on the values you see in the data.

For reference, Tables gives you that info right in the UI:

Image

Again, it's possible to set a technical question name and I'm wondering, why this is not returned as a field identifier. This would make the usage a lot easier. Otherwise, It would be necessary to display the question ID in the UI similar to what's done in Tables.

ericfischereu avatar Apr 29 '25 17:04 ericfischereu