verbb / formie

The most user-friendly forms plugin for Craft CMS.
Other
95 stars 72 forks source link

Field overrides don't output anything #1754

Closed joelstrom closed 6 months ago

joelstrom commented 7 months ago

Describe the bug

Using field.render() with custom overrides according to the documentation here does not seem to output any of the defined overrides, only the default attributes and values.

Steps to reproduce

Expectation: Outputting field overrides with the help of the example below adds a class attribute with value "freeform-input" etc. to the rendered field

{{ field.render({ class: "freeform-input", labelClass: "freeform-label" ~ (field.required ? " freeform-required" : ""), errorClass: "freeform-errors", instructionsClass: "freeform-instructions", instructionsBelowField: true, overrideValue: "This is now the new default value", inputAttributes: { "data-field-id": field.id, } }) }}

Reality: Field gets output with only default attributes and values, similarly to how it would if one would simply use {{ field.render() }} without added overrides.

Form settings

Craft CMS version

4.8.0

Plugin version

5.1.0

Multi-site?

No

Additional context

Craft recently upgraded from Craft 3.9 -> 4.8 Freeforms recently upgraded from 3.13.35 > 5.1.0 following the upgrade guide. Only note regarding field render was regarding "option.checked" which has been fixed and seems to work well!

engram-design commented 6 months ago

Is this about Formie, or Freeform? It seems like the latter, as we don't have field.render() and you're referencing Freeform. But let me know!

joelstrom commented 6 months ago

Sorry, I've clearly found myself on the wrong Github! 😄