mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 10:02:05 +00:00
fix(n8n Form Node): Redirection update (no-changelog) (#13104)
Co-authored-by: Dana <152518854+dana-gill@users.noreply.github.com>
This commit is contained in:
@@ -2,8 +2,6 @@ import { type Response } from 'express';
|
||||
import {
|
||||
type NodeTypeAndVersion,
|
||||
type IWebhookFunctions,
|
||||
FORM_NODE_TYPE,
|
||||
WAIT_NODE_TYPE,
|
||||
type FormFieldsParameter,
|
||||
type IWebhookResponseData,
|
||||
} from 'n8n-workflow';
|
||||
@@ -43,20 +41,6 @@ export const renderFormNode = async (
|
||||
) as string) || 'Submit';
|
||||
}
|
||||
|
||||
const responseMode = 'onReceived';
|
||||
|
||||
let redirectUrl;
|
||||
|
||||
const connectedNodes = context.getChildNodes(context.getNode().name);
|
||||
|
||||
const hasNextPage = connectedNodes.some(
|
||||
(node) => !node.disabled && (node.type === FORM_NODE_TYPE || node.type === WAIT_NODE_TYPE),
|
||||
);
|
||||
|
||||
if (hasNextPage) {
|
||||
redirectUrl = context.evaluateExpression('{{ $execution.resumeFormUrl }}') as string;
|
||||
}
|
||||
|
||||
const appendAttribution = context.evaluateExpression(
|
||||
`{{ $('${trigger?.name}').params.options?.appendAttribution === false ? false : true }}`,
|
||||
) as boolean;
|
||||
@@ -67,9 +51,9 @@ export const renderFormNode = async (
|
||||
formTitle: title,
|
||||
formDescription: description,
|
||||
formFields: fields,
|
||||
responseMode,
|
||||
responseMode: 'responseNode',
|
||||
mode,
|
||||
redirectUrl,
|
||||
redirectUrl: undefined,
|
||||
appendAttribution,
|
||||
buttonLabel,
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user