mirror of
https://github.com/n8n-io/n8n.git
synced 2024-11-10 22:54:05 -08:00
65 lines
1,012 B
TypeScript
65 lines
1,012 B
TypeScript
import { INodeProperties } from 'n8n-workflow';
|
|
|
|
export const formOperations = [
|
|
{
|
|
displayName: 'Operation',
|
|
name: 'operation',
|
|
type: 'options',
|
|
displayOptions: {
|
|
show: {
|
|
resource: [
|
|
'forms',
|
|
],
|
|
},
|
|
},
|
|
options: [
|
|
{
|
|
name: 'Submit a form',
|
|
value: 'submit',
|
|
description: 'Store submission of a form',
|
|
},
|
|
|
|
],
|
|
default: 'submit',
|
|
description: 'The operation to perform.',
|
|
}
|
|
] as INodeProperties[];
|
|
|
|
export const formFields = [
|
|
{
|
|
displayName: 'Form',
|
|
name: 'form',
|
|
type: 'string',
|
|
displayOptions: {
|
|
show: {
|
|
resource: [
|
|
'forms',
|
|
],
|
|
},
|
|
},
|
|
default: '',
|
|
required: true,
|
|
description: 'Name of the form to operate on.'
|
|
},
|
|
|
|
// Forms:submit
|
|
{
|
|
displayName: 'Form data',
|
|
name: 'form',
|
|
type: 'json',
|
|
required: true,
|
|
default: '',
|
|
typeOptions: {
|
|
alwaysOpenEditWindow: true,
|
|
},
|
|
displayOptions: {
|
|
show: {
|
|
resource: [
|
|
'forms',
|
|
],
|
|
},
|
|
},
|
|
description: 'The data to save.',
|
|
},
|
|
] as INodeProperties[];
|