mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 10:02:05 +00:00
feat(n8n Form Node): Add Hidden Fields (#12803)
This commit is contained in:
@@ -167,6 +167,11 @@ export function prepareFormData({
|
||||
} else if (fieldType === 'html') {
|
||||
input.isHtml = true;
|
||||
input.html = field.html as string;
|
||||
} else if (fieldType === 'hiddenField') {
|
||||
input.isHidden = true;
|
||||
input.hiddenName = field.fieldName as string;
|
||||
input.hiddenValue =
|
||||
input.defaultValue === '' ? (field.fieldValue as string) : input.defaultValue;
|
||||
} else {
|
||||
input.isInput = true;
|
||||
input.type = fieldType as 'text' | 'number' | 'date' | 'email';
|
||||
@@ -432,6 +437,9 @@ export async function formWebhook(
|
||||
if (field.fieldType === 'html') {
|
||||
field.html = sanitizeHtml(field.html as string);
|
||||
}
|
||||
if (field.fieldType === 'hiddenField') {
|
||||
field.fieldLabel = field.fieldName as string;
|
||||
}
|
||||
return field;
|
||||
},
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user