“I reserve the right to be smarter tomorrow than I am today.” – Dr. Alexander Elder
Or, as an alcoholic might say, “I had a moment of clarity”.
It turns out there is yet an easier way of enhancing workflow Initiation forms. In short, all you actually have to do is follow these few simple steps:
- Create a new ASPX page in SPD and add a Custom List Form for the list your workflows are associated with. It should be an Edit form.
- Open your Initiation form in SPD.
- For each field you want to “inherit” directly from your list, simply copy the markup between the <tr> tags delineating that particular Edit form row.
- Paste to replace the corresponding field in the Initiation form markup. For example, if you want to use a People Picker field called “Issue Assignee” from the edit form, you will copy/paste the SharePoint:FormField markup into the Initiation form to replace the asp:TextBox field SPD generated from your “IssueAssignee” Initiation form variable (System.String type).
- Delete the line of SharePoint:FieldDescription markup.
- Now replace the “post as” variable in the __designer:bind attribute of this FormField markup (e.g. ‘@Issue_x0020_Assignee’) with the variable name of your Initiation variable (e.g. ‘@IssueAssignee’).
A quick note on the custom content types that may be used in your list. I have found with these process-to-task-to-workflow mappings that it can be helpful to use content types in a hierarchal fashion. That is, using the Item content type as the parent type, but in the opposite way from Type inheritance. Instead of using Item as a base type that you expand into sub-type specializations, you can use Item as a content type containing all your columns. This is of course what Item represents before you enable your list for content types. There are a number of advantages to this approach that I’ll detail in another post, but for this topic it allows you to generate a complete set of list fields for the cases where you use custom content types to “partition” your list fields. If this part of the subject is not meaningful, then you probably don’t care about it right now :-)