2020-04-04 07:04:25 -07:00
|
|
|
import { INodeProperties } from 'n8n-workflow';
|
|
|
|
|
|
|
|
export const formOperations = [
|
|
|
|
{
|
|
|
|
displayName: 'Operation',
|
|
|
|
name: 'operation',
|
|
|
|
type: 'options',
|
|
|
|
displayOptions: {
|
|
|
|
show: {
|
|
|
|
resource: [
|
2020-04-06 01:03:49 -07:00
|
|
|
'form',
|
2020-04-04 07:04:25 -07:00
|
|
|
],
|
|
|
|
},
|
|
|
|
},
|
|
|
|
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 = [
|
2020-04-05 06:49:47 -07:00
|
|
|
{
|
|
|
|
displayName: 'Form',
|
|
|
|
name: 'form',
|
|
|
|
type: 'string',
|
|
|
|
displayOptions: {
|
|
|
|
show: {
|
|
|
|
resource: [
|
2020-04-06 01:03:49 -07:00
|
|
|
'form',
|
2020-04-05 06:49:47 -07:00
|
|
|
],
|
|
|
|
},
|
|
|
|
},
|
|
|
|
default: '',
|
|
|
|
required: true,
|
|
|
|
description: 'Name of the form to operate on.'
|
|
|
|
},
|
|
|
|
|
2020-04-06 01:03:49 -07:00
|
|
|
// Form:submit
|
2020-04-04 07:04:25 -07:00
|
|
|
{
|
|
|
|
displayName: 'Form data',
|
|
|
|
name: 'form',
|
|
|
|
type: 'json',
|
|
|
|
required: true,
|
|
|
|
default: '',
|
|
|
|
typeOptions: {
|
|
|
|
alwaysOpenEditWindow: true,
|
|
|
|
},
|
|
|
|
displayOptions: {
|
|
|
|
show: {
|
|
|
|
resource: [
|
2020-04-06 01:03:49 -07:00
|
|
|
'form',
|
2020-04-04 07:04:25 -07:00
|
|
|
],
|
|
|
|
},
|
|
|
|
},
|
|
|
|
description: 'The data to save.',
|
|
|
|
},
|
|
|
|
] as INodeProperties[];
|