mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 10:02:05 +00:00
fix(n8n Form Node): Completion page display if EXECUTIONS_DATA_SAVE_ON_SUCCESS=none (#11869)
This commit is contained in:
@@ -267,7 +267,7 @@ export class Form extends Node {
|
||||
|
||||
const method = context.getRequestObject().method;
|
||||
|
||||
if (operation === 'completion') {
|
||||
if (operation === 'completion' && method === 'GET') {
|
||||
const staticData = context.getWorkflowStaticData('node');
|
||||
const id = `${context.getExecutionId()}-${context.getNode().name}`;
|
||||
const config = staticData?.[id] as CompletionPageConfig;
|
||||
@@ -300,6 +300,12 @@ export class Form extends Node {
|
||||
return { noWebhookResponse: true };
|
||||
}
|
||||
|
||||
if (operation === 'completion' && method === 'POST') {
|
||||
return {
|
||||
workflowData: [context.evaluateExpression('{{ $input.all() }}') as INodeExecutionData[]],
|
||||
};
|
||||
}
|
||||
|
||||
if (method === 'GET') {
|
||||
const options = context.getNodeParameter('options', {}) as {
|
||||
formTitle: string;
|
||||
@@ -336,7 +342,7 @@ export class Form extends Node {
|
||||
const connectedNodes = context.getChildNodes(context.getNode().name);
|
||||
|
||||
const hasNextPage = connectedNodes.some(
|
||||
(node) => node.type === FORM_NODE_TYPE || node.type === WAIT_NODE_TYPE,
|
||||
(node) => !node.disabled && (node.type === FORM_NODE_TYPE || node.type === WAIT_NODE_TYPE),
|
||||
);
|
||||
|
||||
if (hasNextPage) {
|
||||
@@ -426,6 +432,9 @@ export class Form extends Node {
|
||||
};
|
||||
|
||||
staticData[id] = config;
|
||||
|
||||
const waitTill = new Date(WAIT_INDEFINITELY);
|
||||
await context.putExecutionToWait(waitTill);
|
||||
}
|
||||
|
||||
return [context.getInputData()];
|
||||
|
||||
Reference in New Issue
Block a user