Skip to content

When a submission is pending, the fields should render statically for editors #805

@MoritzLost

Description

@MoritzLost

Describe the bug

After submitting a draft for review, editors can still edit fields in the form, even though they can't modify the submitted draft. This is bad in terms of the author experience. Editors might enter a bunch of changes after submitting a draft without realizing they can't modify it anymore, and end up losing their work.

The AX in terms of error reporting in this state is also not good. As soon as you type anything in any field, Craft tries to automatically save the draft, which fails because of the server-side validation. The error, however, doesn't tell you anything about what the problem is:

Image

The draft could not be saved.

Suggested solution

When a user can only create drafts, but not save live entries, opening an entry form with render all fields statically. Before they can do anything, they have to click on Create draft. At this point, the form becomes interactive and they can edit their draft.

In the state described above, the entry form should be rendered statically in the same way. You can still see all the fields, but not edit anything. In order to edit the draft again, the editor has to wait for the submission review, or retract the draft


As a sidenote, this problem is compounded by a bug in the Google Maps plugin field, which causes the field to be marked as having unsaved changes immediately: doublesecretagency/craft-googlemaps#138

This results in all entries showing the above error immediately after submission.

Steps to reproduce

  1. As an editor, create a draft and submit it.
  2. The entry form is still active.

Craft CMS version

5.8.11

Plugin version

3.0.9

Multi-site?

No

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions