Skip to main content

I need to disable the K2 Submit button within the K2 Taskpane.   I can't disable the K2 taskpane because I use the taskpane  for other ASP custom activities.   When I disable the K2 taskpane in InfoPath integration it also disables me from using my own custom stuff via taskpane.  I submit K2 via my own buttons within the InfoPath form views.   Any suggestions ?


It looks like I need to somehow add my HTML task pane to the dropdown list where you select the K2 task pane in INfopath Integration... 


 Thanks. 


 

Hi,


This is a very long shot, but I think it would be as simple as modifying the HTML code of the taskpane_new.htm file that lives in the xsn of your InfoPath document.


If you rename an InfoPath document to .cab you will be able to get hold of this file. Extract all the files to a temporary directory and then search for the button and disable it or hide it using HTML styles. The tricky part is saving it back to a cab and then to xsn, but if memory serves there are utilities that can help you do this. Google is your friend. After you've managed to get it back into the xsn format, update the file that is in your InfoPath Form Templates directory in your Solution Directory. Provided you never change any of the settings regarding the Task Pane in the K2 wizards, this will not be overwritten.


I hope this helps. I haven't done it myself but this is the best solution I can think of.


Regards,



You can usually make a copy of taskpane.htm or taskpane_new.htm located in ‘C:Documents and Settings<CURRENT USER>Application DataSourceCode.Workflow.InfoPath.TempIPResourceFiles’ and modify it to suit your needs. 


To enable it for your IP form,


1.       Open the InfoPath form template in Design mode from within K2 for Visual Studio.


2.       Add the custom task panel's file to the resources for the InfoPath template:  Tools à Resource Files à Add… à  Select the file à click OK


3.       Enable the custom task pane:  Tools à Form Options à Programming àSelect the new resource from 'Task pane location' dropdown list.


4.       Click Ok


5.       Save the form


6.       Close InfoPath


a.       When control is returned to Visual Studio, you should get the message: "The InfoPath form template has successfully been updated by the wizard".


7.       Deploy the process and start an instance.


a.       When you open the worklist item for an InfoPath client event, the custom task pane should display


Reply