cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
JRobinson12
Helper II
Helper II

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

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
v-qiaqi-msft
Community Support
Community Support

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

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. 

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

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 

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
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Top Solution Authors
Top Kudoed Authors
Users online (92,981)