This content has been marked as final. Show 2 replies
If your form is simple; for example two sections that needed to be enabled or disabled based on the User Task in which the form is being viewed, there might be a rather blunt way you can do this.
You could make two copies of the same form with the appropriate changes to the fields and then modify the Form URL repository location in your xfaform variable using a Set Value before the User Task. If other than field status, both forms are the same then the data will still pass from one user's form to the next.
I'm not saying this is a best practice ..and others on the forum might be appalled at such a hack :) But it's easy for simple scenarios. Otherwise you need to learn how to author your form with script triggered from a hidden field value that gets set on the server when you render the form.
You can use the same form and enable/disable some fields according to the user's role with only little scripting. Review the steps the below:
1-First place a hidden field ("user_role") in your form
2-Insert a script object into your form onder "Variables" in object hierarchy and write a script for enabling/disabling the fields (regarding the value of "user_role")
3-On the initialize and change events of the "user_role" call your script object
4-On your process design, put a SetValue service before User tasks. In the asssignment you should set the desired user_role to the form, so that the script is triggered in your form and the fields are enabled/desiabled
Fro further needs on your form or process design you can contact us from: http://www.kgc.com.tr/company_Contact.html