Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Public Forms should support dynamic prefilled / default values #2401

Closed
3 tasks done
sleidig opened this issue Jun 6, 2024 · 2 comments · Fixed by #2635
Closed
3 tasks done

Public Forms should support dynamic prefilled / default values #2401

sleidig opened this issue Jun 6, 2024 · 2 comments · Fixed by #2635
Assignees
Labels
Client: by X Client: _codo released on @master managed by CI (semantic-release) released managed by CI (semantic-release)

Comments

@sleidig
Copy link
Member

sleidig commented Jun 6, 2024

Public Forms (PublicFormConfig based views) should support the same default value system as normal FormComponents 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 from string[][] to FieldGroup[] (support full FormFieldConfig format to overwrite default values if needed; also support field group headers)
    • e.g. PublicFormConfig.columns: [ { fields: [ { id: "remarks", defaultValue: { mode: "static", value: "special default value" } } ]} ]
  • use defaultValue definitions from the underlying EntitySchema of the entity, if it exists and is not overwritten in this PublicFormConfig object

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.

@github-project-automation github-project-automation bot moved this to Triage / Analysis in All Tasks & Issues Jun 6, 2024
@sleidig sleidig moved this to Planned in Feature Roadmap Jul 15, 2024
@sleidig sleidig added this to the codo Public Forms milestone Oct 21, 2024
@sleidig sleidig moved this from Triage / Analysis to Todo (ready for work) in All Tasks & Issues Oct 21, 2024
@Abhinegi2 Abhinegi2 moved this from Todo (ready for work) to In Progress in All Tasks & Issues Oct 24, 2024
@sleidig sleidig assigned sleidig and tomwwinter and unassigned sleidig Nov 11, 2024
sleidig pushed a commit that referenced this issue Nov 25, 2024
…e current date (#2635)

closes #2401

---------
Co-authored-by: Sebastian <[email protected]>
@github-project-automation github-project-automation bot moved this from Planned to Done in Feature Roadmap Nov 25, 2024
@github-project-automation github-project-automation bot moved this from In Review to Done in All Tasks & Issues Nov 25, 2024
@aam-digital-ci
Copy link
Collaborator

🎉 This issue has been resolved in version 3.43.0-master.8 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@aam-digital-ci aam-digital-ci added the released on @master managed by CI (semantic-release) label Nov 25, 2024
@aam-digital-ci
Copy link
Collaborator

🎉 This issue has been resolved in version 3.43.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@aam-digital-ci aam-digital-ci added the released managed by CI (semantic-release) label Nov 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Client: by X Client: _codo released on @master managed by CI (semantic-release) released managed by CI (semantic-release)
Projects
Archived in project
Status: Done
Development

Successfully merging a pull request may close this issue.

4 participants