ALF - How to prevent adding pictures to formally closed documents?
We have officers that write citations and then, after the fact, they may decide to add photographs that they forgot to take. We are currently programming all forms to have user validation and to close upon submit.
However, we found out that photos can be added to a form after it has successfully been submitted and closed. The problem is that the officers can mistakenly attach the new photos to the incorrect ticket. It takes much time to go back and make sure that the necessary photos have been added to the right form. How can we prevent it? Why isn't the document closed for all additions?
A closed document is only closed for modification by the pen.
In your 'event handler', set the document state to Document::STATE_COMPLETED - this will prevent addition of attachments too.