|
||
Now that the form now supports collaboration and the collaboration job controller has been set up, you should now modify the form to behave suitably for collaboration.
By "behavior" we mean the visibility and editability of different parts of the form during each of the collaboration steps. Just as in the analog era, when parts of a form would be marked "For Office Use Only", you want parts of the form to be invisible to applicants at the "Start" step, that is: when applicants fill out the form for the first time. Their submission of the form initiates the collaboration job. There are parts of the form that you will not want to be visible — these will be later used by reviewers. If a reviewer declines the application and sends it back to the applicant, there will be some of these internal-use fields that you would want to now be visible to the applicant.
Just as important is editability. You would probably want the applicant's original data to be read-only for the review steps; and the reviewer comments should not be editable for applicants when they fulfill the request to supply more data.
You should be setting these properties on whole sections of the form, or on blocks at least. Do not waste your time by setting the behavior of individual form elements.
The Rules Editor ("Edit Properties -> Rules -> Visibility | Editability -> Rule Based -> Edit... button") is easier to use than the Scripts Editor. So, selecting a single step (other than "Start") is a simple matter of comparing the current step of the collaboration job with the step you want a form element to be visible or editable. You pick up the current step name by pointing at the "<Form Name> -> Nuts & Bolts -> Transaction Manager Support -> CollaborationSupport -> StepName" data field:
When the collaboration job is actually running, the form is only prepopulated in the steps subsequent to "Start". Which means that setting a rule by String ... Equals Start will not work. Neither will leaving the field blank after the Equals term. The safest way is to exclude all the subsequent steps, as follows:
A slightly more advanced way of specifying form collaborative behavior is through the Scripts Editor ("Edit Properties -> Rules -> Visibility | Editability -> Script Based -> Edit... button"):
The script for making the script true for the Start step is:
sfc.getPhaseValue("cc.step.name") == "Start" || sfc.getPhaseValue("cc.step.name")==null || sfc.getPhaseValue("cc.step.name")=="";
And for "Initial Review":
sfc.getPhaseValue("cc.step.name")=="Initial Review";
Note: you also have to configure the triggering events if you are going to use the Collaboration Test Block to manually change the Step Name and are referencing the phase value in your scripts (instead of the StepName widget in Nuts & Bolts).
The Maguire template Navigation bar works as expected: when a whole section is made invisible at a given step, that step will not appear in the Navigation Bar or the Mobile Slider.