chore(Form Node): Add dropdown example (#18809)

Co-authored-by: Michael Kret <michael.k@radency.com>
This commit is contained in:
yehorkardash
2025-09-05 09:09:00 +03:00
committed by GitHub
parent 3175650a7a
commit 6456b7c07d
4 changed files with 24 additions and 4 deletions

View File

@@ -71,7 +71,7 @@ export const formFieldsProperties: INodeProperties[] = [
rows: 5,
},
default:
'[\n {\n "fieldLabel":"Name",\n "placeholder":"enter you name",\n "requiredField":true\n },\n {\n "fieldLabel":"Age",\n "fieldType":"number",\n "placeholder":"enter your age"\n },\n {\n "fieldLabel":"Email",\n "fieldType":"email",\n "requiredField":true\n }\n]',
'[\n {\n "fieldLabel": "Name",\n "placeholder": "enter your name",\n "requiredField": true\n },\n {\n "fieldLabel": "Age",\n "fieldType": "number",\n "placeholder": "enter your age"\n },\n {\n "fieldLabel": "Email",\n "fieldType": "email",\n "requiredField": true\n },\n {\n "fieldLabel": "Textarea",\n "fieldType": "textarea"\n },\n {\n "fieldLabel": "Dropdown Options",\n "fieldType": "dropdown",\n "fieldOptions": {\n "values": [\n {\n "option": "option 1"\n },\n {\n "option": "option 2"\n }\n ]\n },\n "requiredField": true\n },\n {\n "fieldLabel": "Checkboxes",\n "fieldType": "checkbox",\n "fieldOptions": {\n "values": [\n {\n "option": "option 1"\n },\n {\n "option": "option 2"\n }\n ]\n }\n },\n {\n "fieldLabel": "Radio",\n "fieldType": "radio",\n "fieldOptions": {\n "values": [\n {\n "option": "option 1"\n },\n {\n "option": "option 2"\n }\n ]\n }\n },\n {\n "fieldLabel": "Email",\n "fieldType": "email",\n "placeholder": "me@mail.con"\n },\n {\n "fieldLabel": "File",\n "fieldType": "file",\n "multipleFiles": true,\n "acceptFileTypes": ".jpg, .png"\n },\n {\n "fieldLabel": "Number",\n "fieldType": "number"\n },\n {\n "fieldLabel": "Password",\n "fieldType": "password"\n }\n]\n',
validateType: 'form-fields',
ignoreValidationDuringExecution: true,
hint: '<a href="https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.form/" target="_blank">See docs</a> for field syntax',

View File

@@ -89,6 +89,7 @@ export const formFields: INodeProperties = {
type: 'options',
default: 'text',
description: 'The type of field to add to the form',
// Update ALLOWED_FIELD_TYPES in packages/workflow/src/type-validation.ts when adding new field types
options: [
{
name: 'Checkboxes',