How to Clone an Infopath Form 如何复制一个新的 eFormInfopath Form ?

    技术2025-12-15  13

    How to Clone an Infopath Form

    From : http://vspug.com/michael/2007/06/28/how-to-clone-an-infopath-form/

     

    (migrated post from November 21st, 2006) 

    We've faced the situation that we had to clone an existing managed InfoPath form. If you just copy it and work on it, you'll face problems whenver a user is working with both forms on the same machine, since InfoPath will tell you that the current form is already on the machine (Cache), however in (most likely) another version.

    In order to really "clone" the form, you have to change the namespace. My research did not give me any useful resources in order to accomplish this task efficiently – I did not even find a decent description on what I have to do.

    Well, looking at it now, it is rather simple to change the namespace of an infopath form:

    Original Namespace: http://schemas.microsoft.com/office/infopath/2003/myXSD/2004-03-09T14-09-40

    Target Namespace: http://advaltech.net/sharepoint/infopath/it/adressen

    What to do:

    ú         Deploy the files contained in the XSN to a directory

    ú         If managed InfoPath form: Just take the project's directory

    ú         In case of a "regular" form: Deploy to directory and extract files

    ú         Locate the "my"-Namespace Declaration in the manifest.xsf file and copy itFor example:

    ú         Scan all files for this Namespace and replace it with your new namespace

    ú         I used notepad instead of vs.net, old fashioned but you can be sure that you really just find&replace J

    ú         Re-Create the cloned form by Right-Clicking on the manifest file and enter design mode

    ú         For managed Forms: just open the project and the InfoPath should show up normally again. Well, that's it, simple, isn't it!? 

     

     

    最新回复(0)