You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For context, I need to implement forms for CMS users, no front-end is involved here, so the Payload Form Builder plugin is not a solution. Let's hypothetically have the following requirements.
There is a collection Car.
Each Car has different model number.
There is a collection Maintenance report form.
There are variations of Maintenance report form (different templates).
Car is related to Maintenance report form (has-one relationship).
When a Car is generated, it automatically generates a pre-fill Maintenance report form.
Model number of a Car decides which variation of a Maintenance report form is created.
The form is filled out by only CMS users.
The form has conditional flows.
Forms should be customizable by end users to include and exclude fields to create a reusable template
Okay, some of the requirements might not be too relevant, but that gives the context why I need this specific type of form. Here is my current thought.
The automatic form generation can be created using hooks.
The form generation (create) can be limited to only Local API via ACL, so no CMS user can create them. This is to avoid duplication with an automatically generated form. However, CMS users can update the forms.
The conditional flows of form can be simulated by some form of grouping and use admin.condition.
I'm still thinking about an approach to create a user-customizable reusable form variations. As in, they can create different variations of Maintenance report form.
The mentioned approach only used Payload components, but there is a possibility to substitute that partially, or in full, with a customized form components. This is certainly more complexed, but is also more customizable.
With that said, what is a recommended approach to tackle this CMS form problem? Please let me know if I'm missing something.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
For context, I need to implement forms for CMS users, no front-end is involved here, so the Payload Form Builder plugin is not a solution. Let's hypothetically have the following requirements.
Car
.Car
has different model number.Maintenance report form
.Maintenance report form
(different templates).Car
is related toMaintenance report form
(has-one relationship).Car
is generated, it automatically generates a pre-fillMaintenance report form
.Car
decides which variation of aMaintenance report form
is created.Okay, some of the requirements might not be too relevant, but that gives the context why I need this specific type of form. Here is my current thought.
create
) can be limited to only Local API via ACL, so no CMS user can create them. This is to avoid duplication with an automatically generated form. However, CMS users can update the forms.admin.condition
.Maintenance report form
.The mentioned approach only used Payload components, but there is a possibility to substitute that partially, or in full, with a customized form components. This is certainly more complexed, but is also more customizable.
With that said, what is a recommended approach to tackle this CMS form problem? Please let me know if I'm missing something.
Beta Was this translation helpful? Give feedback.
All reactions