Introduction
In one of my previous articles I described how you can change the e-mail messages sent during workflow activities. I mentioned that it is also possible to change the look and feel of the workflow task form:
In this article I will explain how easy it is to create your own custom task form
Open SharePoint Designer and find your workflow settings page. At the right bottom of the screen you will find Forms:
There are two forms, one for the Initiation (optional) and Task. We are going to change this one so click at Approval.xsn to open it. The task form will open in InfoPath:
This is pretty awesome because we can use features from InfoPath such as rules en controls! Let’s start!
Look and feel
You can change the look and feel of the form by selecting a theme. Go to Page Design and select the theme you prefer. For example:
It is as easy as that! Now you can also add a title and a company logo to personalize the form even further. Click at Insert and Picture to add a logo:
You can resize a couple fields, just look at Due Date, this field is to stretched out. It would be nice if the Comments field can be mandatory. Unfortunately you can’t select this option in the properties of the field.
This would be a good time to start using the rules feature of InfoPath! This is a slight workaround but it does the trick. You can disable the buttons if the comments field is empty! Click at Manage Rules and then perform the following actions:
- Select the button
- Click at New and Formatting
- Configure the following condition:
- Comments is blank
- Select Disable this control
The Approve button is disabled because the Comments field is empty! You can copy the rule and apply it to every button. To make life a bit easier for the approvers change the text under the comments field so they now the field is mandatory.You need to save the form before you can republish it. Let’s start the workflow and open the task form:
This is pretty cool right? Just remember that you only changed one view! There are couple more:
So don't forget to change these as well. I hope you enjoyed this article
8:47 AM
Unknown
Posted in: 
12 replies:
Very useful, thanks!
Hi Jasper
Is it possible to enable the 'Approve' button as soon as text appears in the comments box? In my implementation, you are required to 'click' out of the comments box to enable the Approve button - this is a small but noteworthly usability issue.
Thanks!
Hi,
So you cannot click at Approve until you clicked in the comments box?
I love editing the task forms for an Approval workflow; however, I am experiencing a strange error. If I make a change to the Approval workflow, let's say, add another e-mail. When I try to publish the WF, it says I have to update the task form since it's been customized. I open the form in Infopath given the instructions above and then publish the form back to the server without making changes. SPD will then let me publish the modified WF.
The error occurs when I return to the site and attempt to perform any tasks from the Approval workflow. When choosing, approve or change request, nothing happens. The workflow appears to complete the task, but it does not. An error in the ULS logs shows an InfoPath Forms Services error:
Not persisting state for request due to previous errors. Form Template: urn:schemas-microsoft-com:office:infopath:workflowInitAssoc:-AutoGen-2012-12-12T17:37:02:621Z
Have you seen this before?
Hi Cicely,
Unfortunately I have no idea. I advise to post your question at TechNet:
http://social.technet.microsoft.com/Forums/en-us/sharepointcustomizationprevious/threads
Good luck!
I have created the same view. on the workflow when i send a email notification and try to attach this form on it .. i get an error while trying to open the form. Any workarounds?
What kind of error?
Hey there! I know this is somewhat off topic but I was wondering
which blog platform are you using for this site?
I'm getting fed up of Wordpress because I've had problems with
hackers and I'm looking at options for another platform. I would be awesome if you could point me in the direction of a good platform.
my web page Find Duplicate Files
I have tried to edit a workflow using one of your previous ideas to customize the email that is sent out. Once I changed it I received the following error when trying to publish it..
"Workflow Form Update Required: The form Approval Workflow Task_x0028_en-US_x0029_Copy.xsn has been customized using InfoPath and may no longer be compatible with this workflow due to field changes. To continue using the existing form, you must first update it using InfoPath. If you no longer wish to keep your customizations, you can delete the form and a new one will be generated when the workflow is published." Any advice?
Sorry no idea ;( My advise is to post your question at the TechNet forum.
Hi Anonymous, sorry for the late reply. I am using blogger from Google (sssst :P)
Hi,
I can't open approval.xsn, when i click it nothing open can you help me please.
Thanks
Post a Comment