cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Anonymous
Not applicable

Do not clear text inputs on form afer submit

Guys, I need a little help in here.

 

I have a form with a list and there is 10 items the user will choose one by one and submit.

 

But he need to fill another infos before also, and for User Experience, after the SubmitForm, I want that those fields remain the same so he can keep submitting and only change the listitems.

 

But when i submit, the entire form is reseted, I tested with many ways (newform, editform), I have only SubmitForm and it still clear all the inputs.

 

4 REPLIES 4
Community Support Team
Community Support Team

Re: Do not clear text inputs on form afer submit

Hi @Anonymous ,

Do you want to use the value in the TextInput control after submitting the form?

I’ve made a similar test , you could refer this:

1、Set the forms DefaultMode: New

2、Set the form’s Items: {clumn name:If(IsBlank(variable name),"",variable name)}

3Set the submit Button’s OnSelect: Set(variable name,DataCardValue1.Text);SubmitForm(Form1)

After these settings, the value in the TextInput will not be cleared after submitting the form.

 

 

Best regards,

Community Support Team _ Phoebe Liu

 

 

 

 

 

Best regards,

Phoebe

Community Support Team _ Phoebe Liu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

Re: Do not clear text inputs on form afer submit

humm okay i will give it a try.

 

But I have around 10 columns on the form, I will have to create the variable for each column.....

and also I have another 3 forms hahahah

 

if there is a easer way Smiley Sad

 

but thanks for the reply, i will definitly try it now.

 

 

Anonymous
Not applicable

Re: Do not clear text inputs on form afer submit

Actually i want that, when the user submit the form, the values in the textinputs does not disappear so they can change only a single item on the form and then submit again with the same informations on the others textinputs.

 

it is something similar to this, when inputing, the values on the form does not disappear.

/t5/image/serverpage/image-id/33330i6073249DDF6C424F/image-size/large?v=1.0&px=999

https://powerusers.microsoft.com/t5/General-Discussion/Avoid-clearing-the-data-in-form-after-submitt...

But i tried with no success Smiley Sad

 

Super User
Super User

Re: Do not clear text inputs on form afer submit

@Anonymous 

Are you using a SubmitForm to submit or are you patching manually?

 

If you are using SubmitForm, then you might consider this process, rather than to create a variable for every field, just capture the last submit.

So, for your button (or wherever you are using the SubmitForm function), consider this formula:

SubmitForm(yourForm);
UpdateContext({lastInfo: yourForm.LastSubmit});
NewForm(yourForm)

Then, in the Default values of the DataCards on the form, change them all to the following (obviously observing the names of each column for the data card):

If(IsBlank(lastInfo.yourColumnName), ThisItem.yourColumnName, lastInfo.yourColumnName)

That should give you all the same values of the last submitted form for all the fields.  If you have a lot of fields, it will be a pain to do them all, but at least you're only working with one variable then instead of one for each.  

 

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.

Helpful resources

Announcements
firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

SecondImage

Follow PowerApps on Twitter

Stay Up-to-Date by following PowerApps on Twitter

Top Community Contributors for July 2019

Top Community Contributors for July 2019

Let's thank our top community contributors

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

FirstImage

Power Platform World Tour

Coming to a city near you

thirdimage

PowerApps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

FourthImage

Join PowerApps User Group!!

Connect, share, and learn with your peers year-round

FifthImage

Dynamics 365 and Power Platform April 2019 Release notes

Features releasing from April 2019 through September 2019!

Users Online
Currently online: 50 members 4,007 guests
Please welcome our newest community members: