Public Forms should support dynamic prefilled / default values #2401
Labels
Client: by X
Client: _codo
released on @master
managed by CI (semantic-release)
released
managed by CI (semantic-release)
Milestone
Public Forms (
PublicFormConfig
based views) should support the samedefault
value system as normalFormComponent
s of the Entity Details view.Previous system:
PublicFormConfig.prefilled: { "remarks": "added through public form" }
New system:
PublicFormConfig.prefilled
--> removed (write config-migration method in ConfigService)PublicFormConfig.columns
--> change type fromstring[][]
toFieldGroup[]
(support full FormFieldConfig format to overwrite default values if needed; also support field group headers)PublicFormConfig.columns: [ { fields: [ { id: "remarks", defaultValue: { mode: "static", value: "special default value" } } ]} ]
The "default" prefilled values of a field in a Public Form (
PublicFormConfig.prefilled
) currently only allows fixed values and is a separate system from the "standard" default values approach, which is implemented via the EntityFormService and its use of the DefaultValueService. We should only rely on a single implementation of such similar logic. Remove custom implementation of "prefilled" values for public forms and work out a solution how to rely on the same DefaultValueService or EntityFormService methods there.The text was updated successfully, but these errors were encountered: