Question

We are using SP2013 standard so Infopath form service is not available.

By using SharePoint Designer 2013, I copied and renamed the OOB workflow "Approval - SharePoint 2010" to build a new workflow. I have no problem with the logic. Now I want to customize the workflow initiation form.

The requirement is simple:

  1. Mark some field text in red color;
  2. If checkbox A is checked, force check checkbox B.

Is there any workaround?

I am considering use Jquery to add some classes. But it may modify other workflow forms since all workflow forms shared url "/_layouts/15/IniWrkflIP.aspx".

Also when I open xoml.wfconfig.xml I can see the form fields. Can I directly modify the XML? If the workflow logic being updated will the xml be ruined?

Was it helpful?

Solution

I don't think it is an ideal answer but at least it works in my case.

In the system master page, include a Javascript file. Then in the file add follow JQuery script:

var LastPartOfURL = window.location.pathname.split("/").slice(-1)[0].toLowerCase();
if (($.inArray(LastPartOfURL, ['cstwrkflip.aspx', 'wrktaskip.aspx', 'iniwrkflip.aspx']) >= 0){
        CustomizeWorkflowForm();
}

CustomizeWorkflowForm is the function to modify your workflow forms with JQuery. Hence, whenever the user browse 'cstwrkflip.aspx', 'wrktaskip.aspx' or 'iniwrkflip.aspx' the function will be triggered.

Licensed under: CC-BY-SA with attribution
Not affiliated with sharepoint.stackexchange
scroll top