remove optional section - InfoPath Dev Sign in | Join | Help in Code InfoPath (Entire Site) InfoPath Dev InfoPath Dev is dedicated to bringing you the information and tools you need to be successful in your Microsoft Office InfoPath development projects. Home Blogs Forums Photos Downloads InfoPath Dev » InfoPath » Code » remove optional section remove optional section Last post 08-04-2005 07:32 AM by Agni Jonnalagadda. 3 replies. Page 1 of 1 (4 items) Sort Posts: Oldest to newest Newest to oldest Previous Next 07-28-2005 02:44 PM jeanpaul Joined on 07-28-2005 Posts 10 remove optional section Reply Contact I am trying to remove an optional section on click of a button using the ExecuteAction, but it only works when the button is inside the optional section...is there a workaround for this 07-28-2005 03:30 PM In reply to Agni Jonnalagadda Joined on 12-15-2004 India Posts 617 Re: remove optional section Mark as Not AnswerMark as Answer... Reply Contact Hi jeanpaul, Welcome to the Forum! Yes, Other way to do this is to delete the node by writing some code. To delete the node 1. Select the node.2. Select the parent node.3. Use Remove child method and delete the node.AgniInfoPath Dev India Agni / http://www.ggktech.com 07-29-2005 01:26 PM In reply to jeanpaul Joined on 07-28-2005 Posts 10 Re: remove optional section Mark as Not AnswerMark as Answer... Reply Contact Hi Agni:Thank you for your reply, do you have any sample code on how to do this?Thanks 08-04-2005 07:32 AM In reply to Agni Jonnalagadda Joined on 12-15-2004 India Posts 617 Re: remove optional section Mark as Not AnswerMark as Answer... Reply Contact Sorry for being late, here is the codeIXMLDOMNode parentNode = thisXDocument.DOM.selectSingleNode("ParentNodeXPath");IXMLDOMNode childNode = parentNode.selectSingleNode("ChildNodeXPath");parentNode.removeChild(childNode);AgniInfoPath Dev India Agni / http://www.ggktech.com Page 1 of 1 (4 items) Copyright © 2003-2019 Qdabra Software. All rights reserved.View our Terms of Use.