Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(n8n Form Page Node): New node #10390

Merged
merged 94 commits into from
Oct 17, 2024
Merged

Conversation

michael-radency
Copy link
Contributor

@michael-radency michael-radency commented Aug 14, 2024

Summary

New n8n Form that allows the creation of complex multi-step forms and is fully integrated into the workflow, enabling the use of incoming data and branching logic.

n8n Form requires the n8n Form Trigger to be set as the workflow's trigger.

  • Select the type of page: form page or completion screen.
  • Customize each form step's title, description, and button label, or inherit these settings from the trigger.
  • Define form fields using parameters or send them as JSON.
  • Customize the URL with query parameters, which can be used for field defaults. These parameters are also available in the n8n Form nodes connected to that trigger.
    image
    image
    image
    image

Related Linear tickets, Github issues, and Community forum posts

https://linear.app/n8n/issue/NODE-1474/spike-multi-step-form
https://linear.app/n8n/issue/NODE-1472/add-form-node-p0
https://community.n8n.io/t/how-to-use-data-in-formtrigger-node/56897

@michael-radency michael-radency added node/new Creation of an entirely new node n8n team Authored by the n8n team labels Aug 14, 2024
Copy link
Contributor

@ShireenMissi ShireenMissi left a comment

Choose a reason for hiding this comment

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

Mostly looks good 🎉 left some minor comments
also please fix the failing frontend test 🙏

packages/cli/src/webhooks/waiting-forms.ts Outdated Show resolved Hide resolved
packages/cli/src/webhooks/webhook-helpers.ts Outdated Show resolved Hide resolved
packages/editor-ui/src/composables/useRunWorkflow.ts Outdated Show resolved Hide resolved
packages/editor-ui/src/composables/useRunWorkflow.ts Outdated Show resolved Hide resolved
packages/workflow/src/TypeValidation.ts Outdated Show resolved Hide resolved
packages/nodes-base/nodes/Form/Form.node.ts Outdated Show resolved Hide resolved
ShireenMissi
ShireenMissi previously approved these changes Oct 17, 2024
Copy link
Contributor

@ShireenMissi ShireenMissi left a comment

Choose a reason for hiding this comment

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

LGTM 🎉

Copy link
Contributor

⚠️ Some Cypress E2E specs are failing, please fix them before merging

Copy link

cypress bot commented Oct 17, 2024

n8n    Run #7412

Run Properties:  status check passed Passed #7412  •  git commit 470f149f3d: 🌳 🖥️ browsers:node18.12.0-chrome107 🤖 michael-radency 🗃️ e2e/*
Project n8n
Run status status check passed Passed #7412
Run duration 04m 20s
Commit git commit 470f149f3d: 🌳 🖥️ browsers:node18.12.0-chrome107 🤖 michael-radency 🗃️ e2e/*
Committer Michael Kret
View all properties for this run ↗︎

Test results
Tests that failed  Failures 0
Tests that were flaky  Flaky 1
Tests that did not run due to a developer annotating a test with .skip  Pending 0
Tests that did not run due to a failure in a mocha hook  Skipped 0
Tests that passed  Passing 453

Copy link
Contributor

@ShireenMissi ShireenMissi left a comment

Choose a reason for hiding this comment

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

LGTM 🎉

Copy link
Contributor

✅ All Cypress E2E specs passed

@ShireenMissi ShireenMissi merged commit 643d66c into master Oct 17, 2024
34 checks passed
@ShireenMissi ShireenMissi deleted the node-1472-add-form-node-p0 branch October 17, 2024 13:59
@github-actions github-actions bot mentioned this pull request Oct 24, 2024
@janober
Copy link
Member

janober commented Oct 24, 2024

Got released with [email protected]

@mickaelandrieu
Copy link
Contributor

Sorry to interact here, but you are probably the best people to answer me :
I'd like to introduce the markdown support of the Form Description.
By any chance, can someone help me with that (as an open source contribution) and is there any chance to be merged ?

@ashleydoidge
Copy link

Hi @janober @michael-radency, is there a timeout included as part of the form trigger that must be adhered to?

There are a few more transformation steps that I need to do in order to build the second page of my form, using dynamic values to set up some questions & answers, all in all this takes around 5 seconds between the form submission and when the second form should pop up, however the second form never pops up/overwrites the first form, so I have to trigger it manually in my workflow (Which of course wouldn't work in any real life scenarios)

If I re-arrange the form so it's right next to any built in nodes and doesn't include my API calls, it pops up fine as the transformation nodes are instant, but it seems as if the window to trigger the second form is very small and does not allow for any further transformations that I'm using with some API calls to our CRM that extends the flow time to a few seconds.

Any help would be appreciated.

@J-Fo-S
Copy link

J-Fo-S commented Nov 7, 2024

Hi @ashleydoidge you'll probably get a quicker/better response if you ask this in n8n community forum

@ashleydoidge
Copy link

Hi @ashleydoidge you'll probably get a quicker/better response if you ask this in n8n community forum

Thanks, also posted there now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
n8n team Authored by the n8n team node/new Creation of an entirely new node Released
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants