<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://www.infopathdev.com:443/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>General</title><link>https://www.infopathdev.com:443/forums/41.aspx</link><description>If you're not sure where to ask your question, ask it here. If necessary, our moderators will make sure it gets classified in the correct board.</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>Re: Reset a Form</title><link>https://www.infopathdev.com:443/forums/thread/66552.aspx</link><pubDate>Sun, 15 May 2011 22:29:23 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:66552</guid><dc:creator>Skarn</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/66552.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=66552</wfw:commentRss><description>&lt;p&gt;This sounds like a question which might have been asked before. &lt;br /&gt;But I decided not to search myself - but still try and give you an answer. &lt;br /&gt;Maybe there are better methods already, or this could be one which hasn&amp;#39;t been done.&lt;br /&gt;&lt;br /&gt;This is a JScript method which I place behind a button.&lt;br /&gt;&lt;/p&gt;&lt;blockquote&gt;&lt;p&gt;//load the template.xml file into a new memory XML DOM&lt;br /&gt;var domSample = XDocument.CreateDOM();
&lt;br /&gt;	domSample.load(&amp;quot;template.xml&amp;quot;);
	
	&lt;br /&gt;&lt;br /&gt;//collect all the nodes of the form (except root node)
&lt;br /&gt;	var nodeChildren = XDocument.DOM.selectNodes(&amp;quot;//my:myFields/*&amp;quot;);
&lt;br /&gt;&lt;br /&gt;//loop through collection of nodes and remove each one
&lt;br /&gt;	for(var i=0; i &amp;lt; nodeChildren.length; i++)
&lt;br /&gt;	{&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; nodeChildren.item(i).parentNode.removeChild(nodeChildren.item(i));
&lt;br /&gt;	}
	
	&lt;br /&gt;&lt;br /&gt;//&amp;#39;merge&amp;#39; the template.xml back into the form
&lt;br /&gt;	XDocument.ImportDOM(domSample); &lt;br /&gt;&lt;/p&gt;&lt;/blockquote&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Reset a Form</title><link>https://www.infopathdev.com:443/forums/thread/66541.aspx</link><pubDate>Fri, 13 May 2011 19:50:48 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:66541</guid><dc:creator>tafavorite</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/66541.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=66541</wfw:commentRss><description>&lt;p&gt;Does anyone know how to reset a form in Infopath 2003. We have a button that is set to open the template and close the current form without prompt, but it seems like in 2003 this is just not working correctly. Is there a different solution that someone might have?&lt;/p&gt;</description></item></channel></rss>