Update hidden columns on Edit/New for either a document properties or a folders properties.

Feb 23, 2016 at 4:24 PM
Enforced Check-out is enabled on the document library in question. Is it possible to use UpdateListItems on the EditForm.aspx/NewForm.aspx page, to modify hidden columns on either a custom document/folder content type? Currently, as I am using SP2007, I used jQuery to briefly show, get and set, then hide them, in order to pass metadata that was entered on the parent and grandparent folders of the document in question. Currently I did not hide them in the document content type, but used jQuery to do so after setting the information. However, based on user environment and load time for the form, they may see them briefly appear then disappear in order to complete their task. If I decided to outright hide them in the content type, could I have the script in the CEWP alter these hidden columns while they are also editing the checked-out document on the Edit/NewForm.aspx? Would the user permissions or the check-out prevent the script from editing those hidden columns on the current document/Folder they are editing (as it would be checked-out -except folders which are not)? Ideally I would like to hide these columns in the content types (both the document and folder) and have the script update those hidden columns when the user edits/uploads the document/folder on the Edit/New Forms pages Would this have to happen say in a presave action?
Mar 1, 2016 at 12:41 PM
That's a bunch of questions mashed together! I think based on what you've said that you have several options:
  • Hide the fields using script - you can "disguise" this phase by hiding the entire form while you manipulate it, and then showing it when you are done
  • Write the fields you aren't showing in the PreSaveAction() - the question there is where the values would come from.