cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Frequent Visitor

Rest Form Fields

How can I reset Individual form fields without using the resetform() function. I just want to reset individual fields after adding it to a collection. 

If possibly how could I reset the form after saving the data to a collection. (Not submission). The submission button is on the collections screen where I view the entered data in a gallery format. 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Microsoft
Microsoft

Re: Rest Form Fields

Hi@JRobinson12,

Based on your needs, you could add several buttons to reset it when you have already seen what you have entered within.

Do you mean that:

  1. No ResetForm() function
  2. Reset some certain fields after adding them to a collection
  3. The user could see what they have entered before they press the save button

If you want 2/3 form fields to be reset when the save button is clicked, I am afraid there is no way to achieve this currently.

If you just want to reset 2/3 form fields, you should insert the Button into every data card that you want to reset as follows:

002.png

Set the OnSelect property of the Button6 as below:

 

Collect(ColForm,DataCardValue9.Text);Reset(DataCardValue9)

 

Set the OnSelect property of the Button7 as below:

 

Collect(ColForm,DataCardValue12.Selected.Value);Reset(DataCardValue12)

 

Best Regards,

Qi

View solution in original post

5 REPLIES 5
Highlighted
Microsoft
Microsoft

Re: Rest Form Fields

Hi@JRobinson12,

Based on the issue that you mentioned, do you want to clear the form Individual field content once collect it to a collection?

Could you please share a bit more about your scenario, is this all Text fields?

I have a test on my side, there are several Text fields within my Form.

I assume that your fields are all Text type, Collect() and Reset() could achieve your needs.

Set the OnChange property of the TextInput control within the corresponding Text DataCard as below:

 

Collect(ColForm,DataCardValue9.Text);Reset(DataCardValue9)

 

Note: DataCardValue9 represents the TextInput control within the corresponding Text DataCard.

If you have some complex type fields within your data source, like Choice or something else, you could consider using ResetForm() function. Considering you want to Submit as well, you can add ResetForm() function to the OnSelect property of the Submit Button as below:

 

SubmitForm(EditForm1);ResetForm(EditForm1)

 

Best Regards,

Qi

Highlighted
Frequent Visitor

Re: Rest Form Fields

The form consist of text input and dropdown. Efficiently I would like to clear certain fields when I click the save to collection button. But if not possible,a simple clear button beside the field I want to clean is just fine as well. 

Highlighted
Microsoft
Microsoft

Re: Rest Form Fields

Hi@JRobinson12,

Combine that with your description, I want to explain the following to you first:

  1. You can set the OnChange property of the TextInput to collect entries, and then reset it, this could work without a Button
  2. If you want to achieve this in Dropdown, you can achieve this in the same way. Set the OnChange property of the Dropdown as below:

 

Collect(ColForm,DataCardValue12.Selected.Value);Reset(DataCardValue12)

 

Set the Default property of your Dropdown as below:

 

""

 

If you have a ComboBox, you should set the DefaultSelectedItems property as below:

 

[""]

 

After that, you can clear all the fields content before submitting your form.

0904Gif1.gif

Best Regards, 

Qi

Highlighted
Frequent Visitor

Re: Rest Form Fields

This works but not how I would want it too. In your solution, the reset happens before the save button is pressed. This doesn’t allow the user to see what they have entered before pressing the save button. Is there a way to reset on save button without using the resetform() function as that would reset all fields. I just want 2/3 form fields to be reset when the save button is clicked 

Highlighted
Microsoft
Microsoft

Re: Rest Form Fields

Hi@JRobinson12,

Based on your needs, you could add several buttons to reset it when you have already seen what you have entered within.

Do you mean that:

  1. No ResetForm() function
  2. Reset some certain fields after adding them to a collection
  3. The user could see what they have entered before they press the save button

If you want 2/3 form fields to be reset when the save button is clicked, I am afraid there is no way to achieve this currently.

If you just want to reset 2/3 form fields, you should insert the Button into every data card that you want to reset as follows:

002.png

Set the OnSelect property of the Button6 as below:

 

Collect(ColForm,DataCardValue9.Text);Reset(DataCardValue9)

 

Set the OnSelect property of the Button7 as below:

 

Collect(ColForm,DataCardValue12.Selected.Value);Reset(DataCardValue12)

 

Best Regards,

Qi

View solution in original post

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Watch Now

Experience what’s next for Power Apps

See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Users online (7,110)