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

Readonly values when updating CRUD record #264

Closed
rolandschaub opened this issue Jan 22, 2019 · 6 comments · Fixed by #430
Closed

Readonly values when updating CRUD record #264

rolandschaub opened this issue Jan 22, 2019 · 6 comments · Fixed by #430

Comments

@rolandschaub
Copy link
Member

Sometimes you want to display a value in the update form that should not be edited (like the creation and update datetime of the record). It would be good to be able to make such values readonly.

@nadar
Copy link
Member

nadar commented Jan 22, 2019

= add readonly option for datetime ngrest plugin?

@rolandschaub
Copy link
Member Author

It would be better to make this option available to all kinds of data types.

@nadar
Copy link
Member

nadar commented Jan 22, 2019

This is not possible as the plugins are rendering the ouput different.

datetime => datetime
textarea => nl2br
image =>

etc.

@jettero777
Copy link
Contributor

+1 for adding readonly feature for every plugin.
There are many use cases when a user should not change some DB fields but should be able to read data from it. Of course we can restore old values during update processing, but it is poor UX to let user change a field and don't save changes.
Also a mature CMS allows to restrict access to model's fields per backend usergroup. But probably it is another feature.

@ifuratdev
Copy link

+1 for adding readonly feature for all plugins.

In the list view (index page) already it is showing field values as read only. we can use similar behavior in the form edit page. Since for ready only fields no extra functionality is required.

for example:
For the datetime field, we need only to show the datetime value but no popup to update the datetime value. which is similar to the behavior datetime on the list page. and the same thing for the image field and so on.

see image below for clarification

read-only fields2

@nadar nadar added this to the 3.0 milestone Dec 18, 2019
@nadar
Copy link
Member

nadar commented Dec 19, 2019

With version 3.0 you will be able to use 'readonly' => true

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants