Disable the Input Text field

Hi,

I have a document type with one input field which is String, wanted to disable the input field once the value is entered, it shouldn’t be editable , as I need some unique value for each document created using this document type.

Let’s say I have “Menu” document Type with Field “Unique Id”, I have created multiple documents using “Menu” with different content in each, in order to differentiate each document I want a unique value which shouldn’t be editable by users. I know we can go with UUID, but if document is deleted the UUID will be a new one and we cannot go with the hardcoded UUID.

I also tried adding property “mode” as “view” but this doesnt solve as it is same again if I create multiple documents with “menu”

Please suggest me any solution in order to achieve this.

There’s no easy solution like simple configurations, but if you are with v13.2 or higher, you might want to implement an OpenUI Field Extension [1] for that specific field to have a full control of the field, as a workaround.

Just my two cents,

Woonsan

[1] https://documentation.bloomreach.com/library/concepts/open-ui/open-ui-document-field-extensions.html

You should be able to restrict editing on specific fields using domain rules on the wicket plugins in the namespace (/hippo:namespaces///editor:templates/default/). Though it might be that this won’t work in the editor integrated in the channel manager. You can use a derived data function or workflow event to populate the field. How you generate unique id’s is up to you.