Describe the problem/error/question
I have a n8n form in which I have a dropdown list. This list have fixed options and I want to precomplete it using query params. For example:
https://n8n.example.com.ar/form/example-form?id_recording=123&dropdown-field=hello
I have tried several ways to do it but I don’t find any way.
Information on your n8n setup
- **n8n version: 1.77.3
- **Database (default: SQLite): PostgresSQL
- **n8n EXECUTIONS_PROCESS setting (default: own, main): self-hosted
- **Running n8n via (Docker, npm, n8n cloud, desktop app): docker
- **Operating system: Debian
2 Likes
Although it would be nice if there were more advanced form-initialization functions built in, n8n’s form trigger is a basic, bare-bones, “get things up and running fast” kind of feature. As far as I can tell, there is no way to use anything from the webhook URL (query params) in expressions when the form is initialized. If you wanted to write up a Feature Request, it might be something the n8n team would consider adding. Be sure to look through the existing form-related feature requests first to see if anything already describes what you need. This one seems similar to me, so you might just add a comment there, and vote on it.
If you need more advanced forms, there is also a trigger node to integrate Form.io, which offers a broad set of web-form feature support.
Check into the Form.io cloud/hosted service, and/or the community edition of Form.io
to see if that would help you accomplish what you want. There is also an online forms builder where you can experiment a bit.
If this answers your question, please mark this post as the Solution.
1 Like
I believe there may have been a small misunderstanding regarding your reply.
This is a bug in the form population.
The question isn’t about to populate the dropdown options via expressions, but rather to preselect a value for an existing static dropdown field using query parameters in the form URL. For example:
https://n8n.example.com.ar/form/example-form?dropdown-field=hello
In this case, the intention is for the dropdown field (with name dropdown-field
) to be automatically pre-filled with the value "hello"
if it matches one of the predefined options.
I’ve heard of finding things that are really bugs and calling them features (as a sarcastic joke), but this might be the first time I’ve heard the “lack of a feature” called a bug.
If there were an option in the Form-Trigger
node configuration, to enable pre-populating the form from URL-query params, and enabling that option didn’t work, then I might agree with calling it a bug.
Again, what was described here is just a function/feature that n8n has not implemented. n8n does a lot, but it will absolutely never do everything anyone wishes it did. Holding a strong opinion that it should do some thing or another, and saying it has a bug if it doesn’t, won’t change anything, but opening a feature request might.