Repeat Function Clears Fields

I have an issue whereby I created a repeat for a field within a div. The count comes from a variable and a button that on click increments the value of the variable. However, on button click, the field is repeated but if any data was already inputted by the user before new repeat then all the fields will be cleared of data.

Any assistance would be greatly appreciated

Hello,
so you actually have let’s say, a group of three inputs.
When someone clicks ‘Add new range’ another group of three inputs is added.

The issue is that the inputs of the previous block are being reset right?

Thank you

Correct

Well what I would do is to save the values of each ‘group’ in the database.
So on every new group of inputs you would get the results from the database.
If you need more details just let me know.

Thank you!

Unfortunately this is not what I want. I have done it in the past whereby it is displayed. Even when duplicating the field. I would like to know what exactly I am doing wrong this time for it not to work on previous.

When I do hear you on that method I would still rather have it working the way it used to as apposed to changing the norm.

So you want all of this to work on the Front end? And only when user has finished to save everything in the database?

Yeah that would be great as. I have a number of other items to be posted with this data within the same form

Any Update/Advice from the WAPPLER Team

If you make it a repeat child does it work?

1 Like

Anthony. You are a life saver. Using repeat region apparently clears the data. But using the repeat child works marvelously. Thanks so much.

1 Like

Yes, I have had the same issues a few times, and Patrick helped me out with it… pleased to pass on the good news! :slight_smile:

1 Like