[Archivesspace_Users_Group] read-only subrecords

Erin Faulder eef46 at cornell.edu
Tue Nov 20 16:46:56 EST 2018

Cornell is creating a plugin to store a small custom subrecord (so far so good) with the additional requirement that it be read-only from the UI (the data will be imported via other means), so the fields should not be editable from the edit page. Is there a supported way to do this? We’ve tried using the “label_and_readonly” form helper method in my template, and while this does result in the fields being output as read-only labels, they aren’t passed back to the server when one attempts to save the object. We end up getting a database error saying that one of the fields does not have a default value, and inspecting the params object in the log file reveals that my subrecord data is not present at all. Marking the properties as “readonly” in the schema results in the same problem. Using a standard “label_and_textfield” works ok so I don’t know if this is a bug or I’m missing something. This is all on version 2.5.0 at the moment.

Any help/direction is greatly appreciated!

Erin Faulder
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lyralists.lyrasis.org/pipermail/archivesspace_users_group/attachments/20181120/9d094df3/attachment.html>

More information about the Archivesspace_Users_Group mailing list