none
How to clear the text from Text box of Infopath form in Infopath form webpart in SharePoint 2013 RRS feed

  • Question

  • Hi
    I have created a InfoPath List form. It is working well with default sharePoint List.
    Then I have placed this in an InfoPath Form WebPart.
    Now When I enter text and press save button it will save to the list.
    But even after save the text is persist in the TextBox.

    How can I clear the text from the textbox after submission?

    Thanks in advance

    Monday, May 12, 2014 11:21 AM

Answers

  • Hi,

    I know why I cannot open new form after changing the Submit Behavior to "Open a new form".

    It is caused by the rules I added to the button. The web part need to close the form and then open a new form.

    To clear the text value after submit the button, there are three methods:

    1. Edit InfoPath Form Web Part, check “Show InfoPath Ribbon or toolbar”, select “Open a new form”. Then when you submit form from the InfoPath Ribbon, it will open a new form.
    2. Customize InfoPath Form, add button and edit properties, select “Open a new form”. Then when you submit form through the Submit Button(It has action to close form), it will open a new form.

        3. Customize InfoPath Form, add button and add rules, select “Leave the form open”. Then when you submit form through the Save Button, it will clear the text value and leave the form open.

    Thank you for your understanding.

    Best Regards,

    Linda Li


    Linda Li
    TechNet Community Support


    • Edited by Lindali Thursday, May 15, 2014 3:55 AM
    • Marked as answer by JasonGuo Sunday, May 25, 2014 7:43 AM
    Thursday, May 15, 2014 3:54 AM

All replies

  • Try this.. In the web part properties for that InfoPath Form web part, change the Submit Behavior to "Open a new form"

    Monday, May 12, 2014 12:46 PM
  • Hi,

    According to your post, my understanding is that you wanted to clear the text from Text box of Infopath form in Infopath form webpart in SharePoint 2013.

    I recommend to customize the Form in InfoPath.

    You need to add rule to the Save Button as below:

    Then when you click the save button in the in Infopath form webpart, the text from Text box will be cleared.

    Best Regards,

    Linda Li


    Linda Li
    TechNet Community Support

    Tuesday, May 13, 2014 7:30 AM
  • Linda, when you use an InfoPath rule to clear the text box, all you are doing is leaving the current form open and deleting what the user has entered. A that point if they click Submit again then their previous data would be overwritten. I think simply changing the behavior to submit and then open a new, blank form would be preferable. This can be done using my suggestion above.

     
    Tuesday, May 13, 2014 12:20 PM
  • Hi John,

    I change the Submit Behavior to "Open a new form", however, it still remain the text value and cannot open new form.

    However, when I customize the form, the Title filed is required.

    If I click the Save Button, the value will be Null.

    In the other word, the Title filed is blank and cannot be submit.

    In the InfoPath form web part, if we change the value of the Title filed and click the Save Button, it will submit the data to create a new item  in the list.

    Thank you for your understanding.

    Best Regards,

    Linda Li


    Linda Li
    TechNet Community Support

    Wednesday, May 14, 2014 1:25 AM
  • I change the Submit Behavior to "Open a new form", however, it still remain the text value and cannot open new form

    Not sure why you are experiencing this. Be sure that you have applied your settings before testing and that there is nothing affecting client-side scripts? I explicitly tested this and found it to be accurate:

    • Put an InfoPath Form web part on a page that points to a simple list
    • Edit the page, edit the web part, change the Submit Behavior to Open a New Form
    • Click Apply and OK in the Edit Properties box, save and/or stop editing the page

    Thereafter, submitting in that InfoPath Form web part clears the text and automatically opens fresh, blank form

    Wednesday, May 14, 2014 12:33 PM
  • Hi,

    I know why I cannot open new form after changing the Submit Behavior to "Open a new form".

    It is caused by the rules I added to the button. The web part need to close the form and then open a new form.

    To clear the text value after submit the button, there are three methods:

    1. Edit InfoPath Form Web Part, check “Show InfoPath Ribbon or toolbar”, select “Open a new form”. Then when you submit form from the InfoPath Ribbon, it will open a new form.
    2. Customize InfoPath Form, add button and edit properties, select “Open a new form”. Then when you submit form through the Submit Button(It has action to close form), it will open a new form.

        3. Customize InfoPath Form, add button and add rules, select “Leave the form open”. Then when you submit form through the Save Button, it will clear the text value and leave the form open.

    Thank you for your understanding.

    Best Regards,

    Linda Li


    Linda Li
    TechNet Community Support


    • Edited by Lindali Thursday, May 15, 2014 3:55 AM
    • Marked as answer by JasonGuo Sunday, May 25, 2014 7:43 AM
    Thursday, May 15, 2014 3:54 AM