Bug? hiddenField not valid for field type?

Hi!

In my form (Node: n8n Form node, page type: Next Form Page) I’ve got the following JSON fields definition:

[
  {
    "fieldLabel": "Orders",
    "fieldType": "dropdown",
    "fieldOptions": {
      "values":
          {{ JSON.stringify($json.output.order_numbers) }}
    },
    "requiredField": true
  },
  {
    "fieldLabel": "HourlyRateDefault",
    "fieldType": "hiddenField",
    "fieldValue": "{{ $json.position.price_net }}"
  },
  {
    "fieldLabel": "HourlyRate",
    "fieldType": "number",
    "placeholder": "{{ $json.position.price_net }}"
  },
  {
    "fieldLabel": "HoursDefault",
    "fieldType": "hiddenField",
    "fieldValue": "{{ $json.output.total_hours }}"
  },
  {
    "fieldLabel": "Hours",
    "fieldType": "number",
    "placeholder": "{{ $json.output.total_hours }}"
  }
]

Trying to run it gives the following error:

{
    “code”: 0,
    “message”: “Field type ‘hiddenField’ in field 1 is not valid for form fields”,
    “stacktrace”: “Error: Field type ‘hiddenField’ in field 1 is not valid for form fields\n    at Object.executeWebhook (/home/xxxxx/.npm-global/lib/node_modules/n8n/src/webhooks/webhook-helpers.ts:500:21)\n    at processTicksAndRejections (node:internal/process/task_queues:105:5)”
}

Removing the two hidden fields from JSON renders the form perfectly. But those hidden fields were the attempt to carry default values, since there’s no way to pre-populate the non-hidden fields with defaults, so I would really love them to be there. Is it a mistake I can’t see?

Information on your n8n setup

  • n8n version: 1.107.4
  • Database (default: SQLite): SQLite
  • n8n EXECUTIONS_PROCESS setting (default: own, main): regular
  • Running n8n via (Docker, npm, n8n cloud, desktop app): npm/pm2
  • Operating system: Ubuntu 24.x

Hey @ficrullausina hope all is well. Welcome to the community.

It does appear to be a bug, please file one here.

Please include an example for repro, yours or this simple one if you want:

Thanks for your reply.

I don’t have a GH account and I really don’t want to create one, but I’ve done some testing and I just used the example provided in the docs (of course without comments). Not working.

What’s more interesting, the same error is reported (before I deleted it from the JSON) for the following field types (all from the example:

  • html
  • checkbox
  • radio
  • hiddenField

I’ve created one on your behalf, hope that’s ok:

2 Likes

@jabbson even though your profile description says “AI”, you are a model human being, thanks! :slight_smile:

1 Like

You are very welcome :slight_smile:

The ticket reports the issue being solved in 1.111.0, I am not running that as it appears to be the “next” release, but wanted to make sure this is announced.

The release 1.111.0 could be pulled by specifying the tag in your dockerfile/compose manifest.