Reset a form to default values - InfoPath Dev
in

InfoPath Dev

Reset a form to default values

Last post 09-14-2006 06:18 AM by Shiva. 3 replies.
Page 1 of 1 (4 items)
Sort Posts: Previous Next
  • 09-13-2006 12:10 AM

    • Monica
    • Not Ranked
    • Joined on 08-23-2006
    • Romania
    • Posts 20

    Reset a form to default values

    Hello,

    This question mught have already been answered but what I found on this topic does not suit exactly what I want.
    I would like to reset the fields in my form without using a reset button (like after submitting) - I can reset the text fields by selecting each node and adding node.text = " ";
    My main problem is how do I reset check boxes to take their default value as almost each set of radio buttons or check boxes I have in the form has a default value wich can be text, boolean or number.
    what about the date fields that automatically take as default today's date?

    Thank you,
    Monica
  • 09-13-2006 06:07 AM In reply to

    • Shiva
    • Top 25 Contributor
    • Joined on 04-15-2005
    • India
    • Posts 694

    Re: Reset a form to default values

    Create a IXMLDomDocument from template.xml file and Replace the main dom root node with the root node from IXMLDomDocument. This will refresh all of the fields in your main dom.

    By using “DateTime.Now” you will get the today#%92s date and set this value to date fields.
  • 09-13-2006 10:59 PM In reply to

    • Monica
    • Not Ranked
    • Joined on 08-23-2006
    • Romania
    • Posts 20

    Re: Reset a form to default values

    Hello,

    Thank you for your fast response - but could you please be more specific.
    I would need to be able to do this without modifying the .xsn package.

    Regards,
    Monica
  • 09-14-2006 06:18 AM In reply to

    • Shiva
    • Top 25 Contributor
    • Joined on 04-15-2005
    • India
    • Posts 694

    Re: Reset a form to default values

    Hi Monica,

    Check out this link you will get more information,

    http://www.infopathdev.com/forums/topic.asp?TOPIC_ID=798
Page 1 of 1 (4 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.