One possibility would be to add a script to the willSave Document Action, which sets the fields to read-only.
This would be the most transparent way to do it, but has a few disadvantages:
• When you develop the form and save it, you must deactivate JavaScript, otherwise, the fields will become read-only before you can get the form out to the user.
• It is legitimate to allow the user to save the form while working with it, be it because he has to get additional information, be it because he gets interrupted.
Another possibility would be adding a button "I am done", which would trigger the making read-only function.
This would take care of the two points above, but there is a big chance that the user forgets to click that button.
If, after filling out the form, there is a submit of some kind, making the fields read-only could be added to this function. The chances that the user forgets to submit are rather low, and the points mentioned above would also be taken care of.
The function to make fields read-only would, in any case, look like this:
for (var i = 0 ; i < this.numFields ; i++) {
var mf = this.getNthFieldName(i) ;
if (this.getField(mf).type != "button") {
this.getField(mf).readonly = true ;
}
}
Here, we do let button fields unchanged, because it may still be useful if certain actions would be possible.
Hope this can help.
Max Wyss.