diff --git a/cypress/e2e/16-form-trigger-node.cy.ts b/cypress/e2e/16-form-trigger-node.cy.ts index 033753bc5c..8316ad97e8 100644 --- a/cypress/e2e/16-form-trigger-node.cy.ts +++ b/cypress/e2e/16-form-trigger-node.cy.ts @@ -14,7 +14,6 @@ describe('n8n Form Trigger', () => { workflowPage.getters.nodeCreatorNodeItems().contains('On form submission').click(); ndv.getters.parameterInput('formTitle').type('Test Form'); ndv.getters.parameterInput('formDescription').type('Test Form Description'); - ndv.getters.parameterInput('fieldLabel').type('Test Field 1'); ndv.getters.backToCanvas().click(); workflowPage.getters.nodeIssuesByName('On form submission').should('not.exist'); }); @@ -26,9 +25,10 @@ describe('n8n Form Trigger', () => { }); ndv.getters.parameterInput('formTitle').type('Test Form'); ndv.getters.parameterInput('formDescription').type('Test Form Description'); - //fill up first field of type number + cy.get('[data-test-id="fixed-collection-add"]').click(); ndv.getters.parameterInput('fieldLabel').type('Test Field 1'); ndv.getters.parameterInput('fieldType').click(); + //fill up first field of type number getVisibleSelect().contains('Number').click(); cy.get( '[data-test-id="parameter-input-requiredField"] > .parameter-input > .el-switch > .el-switch__core', diff --git a/packages/cli/templates/form-trigger.handlebars b/packages/cli/templates/form-trigger.handlebars index 9bef6c1993..a52da98e19 100644 --- a/packages/cli/templates/form-trigger.handlebars +++ b/packages/cli/templates/form-trigger.handlebars @@ -437,141 +437,125 @@
{{/if}} - {{#if validForm}} -
-
-

{{formTitle}}

-

{{{formDescription}}}

-
- -
- {{#each formFields}} - {{#if isMultiSelect}} -
- -
- {{#each multiSelectOptions}} -
- - -
- {{/each}} -
-

- This field is required -

-
- {{/if}} - - {{#if isSelect}} -
- -
- -
-

- This field is required -

-
- {{/if}} - - {{#if isHtml}} -
- {{{html}}} - -
- {{/if}} - - {{#if isHidden}} - - {{/if}} - - {{#if isTextarea}} -
- - -

- This field is required -

-
- {{/if}} - - {{#if isFileInput}} -
- - - -

- This field is required -

-
- {{/if}} - - {{#if isInput}} -
- - -

- This field is required -

-
- {{/if}} - {{/each}} -
- - -
- {{else}} -
-
- {{#if testRun}} -

Please add at least one field to your form

- {{else}} -

Problem loading form

-

- This usually occurs if the n8n workflow serving this form is deactivated or no - longer exist -

- {{/if}} -
+
+
+

{{formTitle}}

+

{{{formDescription}}}

- {{/if}} + +
+ {{#each formFields}} + {{#if isMultiSelect}} +
+ +
+ {{#each multiSelectOptions}} +
+ + +
+ {{/each}} +
+

+ This field is required +

+
+ {{/if}} + + {{#if isSelect}} +
+ +
+ +
+

+ This field is required +

+
+ {{/if}} + + {{#if isHtml}} +
+ {{{html}}} + +
+ {{/if}} + + {{#if isHidden}} + + {{/if}} + + {{#if isTextarea}} +
+ + +

+ This field is required +

+
+ {{/if}} + + {{#if isFileInput}} +
+ + + +

+ This field is required +

+
+ {{/if}} + + {{#if isInput}} +
+ + +

+ This field is required +

+
+ {{/if}} + {{/each}} +
+ + +