Disable a specific admin field

149 views
Skip to first unread message

Tremaine Buchanan

unread,
Nov 18, 2015, 4:25:52 PM11/18/15
to Keystone JS
How can I disable an admin field? There is a created_on date field that I want to capture for a particular model. However, the user is able to change this at will. I would like to prevent the user from updating/changing the entry for the field.

Jeffrey Priebe

unread,
Nov 20, 2015, 12:36:52 PM11/20/15
to Keystone JS

joss

unread,
Nov 22, 2015, 5:33:03 PM11/22/15
to Keystone JS
As mentioned by Jeffrey, you can hide the field from the UI completely:

field { type: String, hidden: true }

or you can disable editing, the value will still be visible to the user:

field: { type: String, noedit: true }

More about field options: http://keystonejs.com/docs/database/#fields-options
Reply all
Reply to author
Forward
0 new messages