Remove nodes with default value - InfoPath Dev
in

InfoPath Dev

Use our Google Custom Search for best site search results.

Remove nodes with default value

Last post 05-08-2007 07:47 AM by sambati. 5 replies.
Page 1 of 1 (6 items)
Sort Posts: Previous Next
  • 05-02-2007 12:55 PM

    Remove nodes with default value

    Is there a way to remove the optional nodes with default values while saving the Infopath form?

     
    Thanks

    Srini 

  • 05-04-2007 07:01 AM In reply to

    Re: Remove nodes with default value

    Hi sambati,

     Removing the nodes through code is possible but if you delete all nodes with out have atleast one, hope will make problem while opening next time. Because in the schema the element will be available and in the xml will not.

    Any way try once by deleting the node with sample.

    B.Shiva Prasad
    InfoPath Dev,
    http://www.ggktech.com
    India
  • 05-05-2007 08:19 PM In reply to

    Re: Remove nodes with default value

    Hi Srini,

    You can do this in code as Shiva has suggested, but you can also do it from a dialog box within the designer. From the Tools menu, select Form Options. On the General tab, click Edit Default Values. From here, deselect any of the nodes that you do not want to be included by default in the form's XML.
    Matt Faus / Microsoft InfoPath MVP
    Qdabra® Software / Streamline data gathering to turn process into knowledge
  • 05-07-2007 01:21 PM In reply to

    Re: Remove nodes with default value

    Hi Matt,

    This is a great solution. However, the fields that are not included by default in the form's XML are grayed out and I can't enter the values for them. Am I missing something.

    Thanks for your reply.

    Srini


     

  • 05-07-2007 02:37 PM In reply to

    Re: Remove nodes with default value

    For sections, you can specify not to include the XML by default from within their properties dialog box. Try checking there.
    Matt Faus / Microsoft InfoPath MVP
    Qdabra® Software / Streamline data gathering to turn process into knowledge
  • 05-08-2007 07:47 AM In reply to

    Re: Remove nodes with default value

    This solution may not work for the following scenario:

    1) Publish form that has <MySection><MyFormElement1 /></ MySection>

    2) Create a form MyForm1.xml using the above form

    3) Modify the schema to add new element to MySection i.e. <MySection><MyFormElement1 /><MyFormElement2 /></ MySection>

    4) Open MyForm1.xml to fill in data for MyFormElement2 but it is not possible as the element is grayed out or disabled.

     
    How can I enable MyFormElement2 in MyForm1.xml so that user can fill in value?
     

Page 1 of 1 (6 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.