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.
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:
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:
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
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,
Combine that with your description, I want to explain the following to you first:
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.
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,
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
SadFox
2
CU06052020-0
2
stampcoin
2